summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2015-01-08 10:16:52 -0800
committerztenghui <ztenghui@google.com>2015-01-09 14:53:47 -0800
commit054a17caaa7cd36f4f4ba644088c4ccf5b9c06fb (patch)
tree7295ebcd8f80ecf652b31a9635d87ca0995eda31 /graphics
parenta1d11273d3dee74f923e567a003653ea9c2ea936 (diff)
downloadframeworks_base-054a17caaa7cd36f4f4ba644088c4ccf5b9c06fb.zip
frameworks_base-054a17caaa7cd36f4f4ba644088c4ccf5b9c06fb.tar.gz
frameworks_base-054a17caaa7cd36f4f4ba644088c4ccf5b9c06fb.tar.bz2
Limit the scope of clip path to the group, not global
http://b/18758765 Change-Id: I899401a5fcbccd0421687bd5cf671f7751092195
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/drawable/VectorDrawable.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/drawable/VectorDrawable.java b/graphics/java/android/graphics/drawable/VectorDrawable.java
index 8b0f635..b5fd8dd 100644
--- a/graphics/java/android/graphics/drawable/VectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/VectorDrawable.java
@@ -913,9 +913,10 @@ public class VectorDrawable extends Drawable {
// Basically the Mfinal = Mviewport * M0 * M1 * M2;
// Mi the local matrix at level i of the group tree.
currentGroup.mStackedMatrix.set(currentMatrix);
-
currentGroup.mStackedMatrix.preConcat(currentGroup.mLocalMatrix);
+ // Save the current clip information, which is local to this group.
+ canvas.save();
// Draw the group tree in the same order as the XML file.
for (int i = 0; i < currentGroup.mChildren.size(); i++) {
Object child = currentGroup.mChildren.get(i);
@@ -928,6 +929,7 @@ public class VectorDrawable extends Drawable {
drawPath(currentGroup, childPath, canvas, w, h, filter);
}
}
+ canvas.restore();
}
public void draw(Canvas canvas, int w, int h, ColorFilter filter) {