Build layer damage bounds for shadows

bug:15538815

Change-Id: I703afeb7e31c28002bd1aff9ce448ec8cdc4e70d
diff --git a/libs/hwui/Rect.h b/libs/hwui/Rect.h
index 846ebdc..9311f99 100644
--- a/libs/hwui/Rect.h
+++ b/libs/hwui/Rect.h
@@ -241,6 +241,13 @@
         bottom = ceilf(bottom);
     }
 
+    void expandToCoverVertex(float x, float y) {
+        left = fminf(left, x);
+        top = fminf(top, y);
+        right = fmaxf(right, x);
+        bottom = fmaxf(bottom, y);
+    }
+
     void dump(const char* label = NULL) const {
         ALOGD("%s[l=%f t=%f r=%f b=%f]", label ? label : "Rect", left, top, right, bottom);
     }