summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Rect.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/Rect.h')
-rw-r--r--libs/hwui/Rect.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/hwui/Rect.h b/libs/hwui/Rect.h
index c230149..0083b77 100644
--- a/libs/hwui/Rect.h
+++ b/libs/hwui/Rect.h
@@ -18,6 +18,7 @@
#define ANDROID_HWUI_RECT_H
#include <cmath>
+#include <SkRect.h>
#include <utils/Log.h>
@@ -68,6 +69,13 @@ public:
bottom(height) {
}
+ inline Rect(const SkRect& rect):
+ left(rect.fLeft),
+ top(rect.fTop),
+ right(rect.fRight),
+ bottom(rect.fBottom) {
+ }
+
friend int operator==(const Rect& a, const Rect& b) {
return !memcmp(&a, &b, sizeof(a));
}