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);
     }