summaryrefslogtreecommitdiff
path: root/libs/hwui/Rect.h
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2015-03-03 14:20:47 -0800
committerChris Craik <ccraik@google.com>2015-03-04 15:32:47 -0800
commit8820fd1d82acaefda98ae73ccf61413d5044f9f3 (patch)
tree8d4096270a7362947bcbf9daee077b6571d30ffd /libs/hwui/Rect.h
parenta9761e698e2f1cffbbb4ed99b89eb1100337b496 (diff)
Patch cleanup, reenable Patch Glops
bug:19597454 Change-Id: If12b95e83588b81a553210cd8c2437c6c771073a
Diffstat (limited to 'libs/hwui/Rect.h')
-rw-r--r--libs/hwui/Rect.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/hwui/Rect.h b/libs/hwui/Rect.h
index 1716cf0ccb91..c82082fe9727 100644
--- a/libs/hwui/Rect.h
+++ b/libs/hwui/Rect.h
@@ -252,6 +252,13 @@ public:
bottom = fmaxf(bottom, y);
}
+ void expandToCoverRect(float otherLeft, float otherTop, float otherRight, float otherBottom) {
+ left = fminf(left, otherLeft);
+ top = fminf(top, otherTop);
+ right = fmaxf(right, otherRight);
+ bottom = fmaxf(bottom, otherBottom);
+ }
+
SkRect toSkRect() const {
return SkRect::MakeLTRB(left, top, right, bottom);
}