From ba248e20b22864e81a5d2c84c61507a0eef0829a Mon Sep 17 00:00:00 2001 From: Bo Brinkman Date: Fri, 17 Sep 2021 22:30:07 +0000 Subject: [PATCH] Enable anti-aliasing for clip-path in vector drawables. I definitely do not know what I'm doing here, so please view with skepticism. I don't know how to check if there are other similar calls that should be updated. To test this I changed the Lens icon in NexusLauncher to use clip-path. You can see the diff here: https://screenshot.googleplex.com/AoXzx2iojWQSS9v Bug: 200304852 Change-Id: I482920c3449fa9e89906b46631b44e6264a46e61 --- libs/hwui/VectorDrawable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/hwui/VectorDrawable.cpp b/libs/hwui/VectorDrawable.cpp index f116641b560f9..983c7766273a1 100644 --- a/libs/hwui/VectorDrawable.cpp +++ b/libs/hwui/VectorDrawable.cpp @@ -269,7 +269,7 @@ void FullPath::FullPathProperties::setPropertyValue(int propertyId, float value) void ClipPath::draw(SkCanvas* outCanvas, bool useStagingData) { SkPath tempStagingPath; - outCanvas->clipPath(getUpdatedPath(useStagingData, &tempStagingPath)); + outCanvas->clipPath(getUpdatedPath(useStagingData, &tempStagingPath), true); } Group::Group(const Group& group) : Node(group) {