From 7cc6ec2cf5ef578cc5dd7874108b9602123da32a Mon Sep 17 00:00:00 2001 From: Doris Liu Date: Tue, 2 Oct 2018 16:15:57 -0700 Subject: Fix regressed alpha change in VD BUG: 116355161 Test: cts-tradefed run commandAndExit cts -d --skip-preconditions --test android.graphics.drawable.cts.VectorDrawableTest --module CtsGraphicsTestCases Change-Id: I4d1bc13d8544d0fc64c5457f8a70c3089a9334c1 --- libs/hwui/VectorDrawable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs') diff --git a/libs/hwui/VectorDrawable.cpp b/libs/hwui/VectorDrawable.cpp index dbbe9f3acf53..6cf04bf5f811 100644 --- a/libs/hwui/VectorDrawable.cpp +++ b/libs/hwui/VectorDrawable.cpp @@ -470,10 +470,10 @@ void Tree::drawStaging(Canvas* outCanvas) { void Tree::getPaintFor(SkPaint* outPaint, const TreeProperties &prop) const { // HWUI always draws VD with bilinear filtering. outPaint->setFilterQuality(kLow_SkFilterQuality); - if (prop.getRootAlpha() < 1.0f || prop.getColorFilter() != nullptr) { + if (prop.getColorFilter() != nullptr) { outPaint->setColorFilter(sk_ref_sp(prop.getColorFilter())); - outPaint->setAlpha(prop.getRootAlpha() * 255); } + outPaint->setAlpha(prop.getRootAlpha() * 255); } Bitmap& Tree::getBitmapUpdateIfDirty() { -- cgit v1.2.3-59-g8ed1b