diff options
author | Bill Peckham <bpeckham@google.com> | 2018-09-08 10:06:40 -0700 |
---|---|---|
committer | Bill Peckham <bpeckham@google.com> | 2018-09-08 10:06:40 -0700 |
commit | a74879d25eb0e4ef53855b57181b038bca75d05f (patch) | |
tree | 2a1ef83944343e547bebeae9998b098557225070 /libs/hwui/VectorDrawable.cpp | |
parent | b00720941bf751117cf02da40add144683ab51f1 (diff) |
Merge QP1A.180823.001
Change-Id: Ia2d6fa811b3c57185c1975db603d59e6eaef73fc
Diffstat (limited to 'libs/hwui/VectorDrawable.cpp')
-rw-r--r-- | libs/hwui/VectorDrawable.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libs/hwui/VectorDrawable.cpp b/libs/hwui/VectorDrawable.cpp index 402fbadfec22..9f82d0fa3018 100644 --- a/libs/hwui/VectorDrawable.cpp +++ b/libs/hwui/VectorDrawable.cpp @@ -474,14 +474,13 @@ SkPaint* Tree::getPaint() { // Update the given paint with alpha and color filter. Return nullptr if no color filter is // specified and root alpha is 1. Otherwise, return updated paint. SkPaint* Tree::updatePaint(SkPaint* outPaint, TreeProperties* prop) { - if (prop->getRootAlpha() == 1.0f && prop->getColorFilter() == nullptr) { - return nullptr; - } else { + // HWUI always draws VD with bilinear filtering. + outPaint->setFilterQuality(kLow_SkFilterQuality); + if (prop->getRootAlpha() < 1.0f || prop->getColorFilter() != nullptr) { outPaint->setColorFilter(sk_ref_sp(prop->getColorFilter())); - outPaint->setFilterQuality(kLow_SkFilterQuality); outPaint->setAlpha(prop->getRootAlpha() * 255); - return outPaint; } + return outPaint; } Bitmap& Tree::getBitmapUpdateIfDirty() { |