summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-09-15 22:04:10 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-15 22:04:10 +0000
commit1f8eb8caac892bfbb527eddfe26c54be0b737f22 (patch)
treef0deb07ef62bd4fb25e413027e0f382a98c9b4da /libs
parent43a4762e8831faed4c12639a514d482e5cd65b31 (diff)
parent65c649c68283335006b6333dc25a2212616d72d6 (diff)
downloadframeworks_base-1f8eb8caac892bfbb527eddfe26c54be0b737f22.zip
frameworks_base-1f8eb8caac892bfbb527eddfe26c54be0b737f22.tar.gz
frameworks_base-1f8eb8caac892bfbb527eddfe26c54be0b737f22.tar.bz2
am 4dae506c: am e27790db: Merge "Force isolation of clip and matrix within layer" into lmp-dev
* commit '4dae506c27327a3ddced29fc15880c86abe3a3a5': Force isolation of clip and matrix within layer
Diffstat (limited to 'libs')
-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()) {