Fix path clipping in VectorDrawable

bug:19946683

Change-Id: I773957df7459eb72ea5d505afb0daac08239ecbf
This commit is contained in:
Chris Craik
2015-04-06 10:47:23 -07:00
parent 095d999045
commit e9c01a40a2
2 changed files with 4 additions and 3 deletions

View File

@@ -966,7 +966,7 @@ public class VectorDrawable extends Drawable {
if (vPath.isClipPath()) {
mRenderPath.addPath(path, mFinalPathMatrix);
canvas.clipPath(mRenderPath, Region.Op.REPLACE);
canvas.clipPath(mRenderPath);
} else {
VFullPath fullPath = (VFullPath) vPath;
if (fullPath.mTrimPathStart != 0.0f || fullPath.mTrimPathEnd != 1.0f) {

View File

@@ -203,8 +203,9 @@ void Snapshot::dump() const {
ALOGD("Snapshot %p, flags %x, prev %p, height %d, ignored %d, hasComplexClip %d",
this, flags, previous.get(), getViewportHeight(), isIgnored(), !mClipArea->isSimple());
const Rect& clipRect(mClipArea->getClipRect());
ALOGD(" ClipRect %.1f %.1f %.1f %.1f",
clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
ALOGD(" ClipRect %.1f %.1f %.1f %.1f, clip simple %d",
clipRect.left, clipRect.top, clipRect.right, clipRect.bottom, mClipArea->isSimple());
ALOGD(" Transform (at %p):", transform);
transform->dump();
}