diff options
Diffstat (limited to 'libs/hwui/Rect.h')
-rw-r--r-- | libs/hwui/Rect.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/hwui/Rect.h b/libs/hwui/Rect.h index 1716cf0..c82082f 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); } |