commit | bf434114cbf55b216fdc76fc8d65a75e84c9dab5 | [log] [tgz] |
---|---|---|
author | Romain Guy <romainguy@google.com> | Thu Sep 16 14:40:17 2010 -0700 |
committer | Romain Guy <romainguy@google.com> | Thu Sep 16 14:40:17 2010 -0700 |
tree | 5ad5f0411e6b804c264bed8927a9786a1942719c | |
parent | b025b9c8b4efefadb01937db61a1f8ee7d2452bf [diff] [blame] |
Snap layer bounds to pixel boundaries. Change-Id: I272ceebf469a119f01ea9d73cdd68519afdffa99
diff --git a/libs/hwui/Rect.h b/libs/hwui/Rect.h index 6b22c2b..5166ee9 100644 --- a/libs/hwui/Rect.h +++ b/libs/hwui/Rect.h
@@ -148,6 +148,13 @@ return false; } + void snapToPixelBoundaries() { + left = floor(left); + top = floor(top); + right = ceil(right); + bottom = ceil(bottom); + } + void dump() const { LOGD("Rect[l=%f t=%f r=%f b=%f]", left, top, right, bottom); }