summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2015-01-09 23:16:21 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-01-09 23:16:23 +0000
commit5a880611cce5276dfb3138b6360a5c69994718be (patch)
treead7a77e63a7652747caae4b7b73ff6ad681c6377 /graphics
parent96798efe991981f4bbeed3c63785f59e125e1b7e (diff)
parent054a17caaa7cd36f4f4ba644088c4ccf5b9c06fb (diff)
downloadframeworks_base-5a880611cce5276dfb3138b6360a5c69994718be.zip
frameworks_base-5a880611cce5276dfb3138b6360a5c69994718be.tar.gz
frameworks_base-5a880611cce5276dfb3138b6360a5c69994718be.tar.bz2
Merge "Limit the scope of clip path to the group, not global"
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 21dba43..f937ddb 100644
--- a/graphics/java/android/graphics/drawable/VectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/VectorDrawable.java
@@ -926,9 +926,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);
@@ -941,6 +942,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) {