Add support for BitmapShader.
This change also fixes an issue with the clip and layers.
Change-Id: I5fd9832098d8cf7ae8eb781ff9bffe7defaea279
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 @@
}
/**
+ * 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;