summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libs/hwui/DisplayListRenderer.cpp3
-rwxr-xr-xlibs/hwui/OpenGLRenderer.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index 5892978..7ee83e6 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -117,6 +117,9 @@ void DisplayListRenderer::restoreToCount(int saveCount) {
int DisplayListRenderer::saveLayer(float left, float top, float right, float bottom,
const SkPaint* paint, int flags) {
+ // force matrix/clip isolation for layer
+ flags |= SkCanvas::kClip_SaveFlag | SkCanvas::kMatrix_SaveFlag;
+
paint = refPaint(paint);
addStateOp(new (alloc()) SaveLayerOp(left, top, right, bottom, paint, flags));
return StatefulBaseRenderer::save(flags);
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 0415efa..25ea729 100755
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -638,6 +638,9 @@ void OpenGLRenderer::onSnapshotRestored(const Snapshot& removed, const Snapshot&
int OpenGLRenderer::saveLayer(float left, float top, float right, float bottom,
const SkPaint* paint, int flags, const SkPath* convexMask) {
+ // force matrix/clip isolation for layer
+ flags |= SkCanvas::kClip_SaveFlag | SkCanvas::kMatrix_SaveFlag;
+
const int count = saveSnapshot(flags);
if (!currentSnapshot()->isIgnored()) {