summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Snapshot.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/Snapshot.h')
-rw-r--r--libs/hwui/Snapshot.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/hwui/Snapshot.h b/libs/hwui/Snapshot.h
index 7265d91..32fee32 100644
--- a/libs/hwui/Snapshot.h
+++ b/libs/hwui/Snapshot.h
@@ -106,6 +106,18 @@ public:
}
/**
+ * Sets the current clip.
+ */
+ void setClip(float left, float top, float right, float bottom) {
+ clipRect.set(left, top, right, bottom);
+ if (flags & kFlagDirtyTransform) {
+ flags &= ~kFlagDirtyTransform;
+ mappedClip.set(clipRect);
+ transform.mapRect(mappedClip);
+ }
+ }
+
+ /**
* Height of the framebuffer the snapshot is rendering into.
*/
int height;