diff options
author | Daniel Norman <danielnorman@google.com> | 2021-02-08 11:11:18 -0800 |
---|---|---|
committer | Daniel Norman <danielnorman@google.com> | 2021-02-17 08:39:59 -0800 |
commit | 337095f9d277c566cb888bc3adbac16576f1ae70 (patch) | |
tree | 8818a5cd44fdfa89f7ef4d8570dbc67239e087dd /libs/hwui/VectorDrawable.cpp | |
parent | 80b7ed3f7373212a33fe42af8a7b7fc0ebcb187c (diff) | |
parent | a66768631e6f47e1f7ffcf4ec86f96d6e8f35282 (diff) |
Merge SP1A.210208.001
Change-Id: I7d4929024872b369444e276a60ded06e37b1fefb
Diffstat (limited to 'libs/hwui/VectorDrawable.cpp')
-rw-r--r-- | libs/hwui/VectorDrawable.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/VectorDrawable.cpp b/libs/hwui/VectorDrawable.cpp index 6030c36add7a..4a21ad6ab945 100644 --- a/libs/hwui/VectorDrawable.cpp +++ b/libs/hwui/VectorDrawable.cpp @@ -507,10 +507,12 @@ void Tree::draw(SkCanvas* canvas, const SkRect& bounds, const SkPaint& inPaint) sk_sp<SkImage> cachedBitmap = getBitmapUpdateIfDirty().makeImage(); + // HWUI always draws VD with bilinear filtering. + auto sampling = SkSamplingOptions(SkFilterMode::kLinear); int scaledWidth = SkScalarCeilToInt(mProperties.getScaledWidth()); int scaledHeight = SkScalarCeilToInt(mProperties.getScaledHeight()); canvas->drawImageRect(cachedBitmap, SkRect::MakeWH(scaledWidth, scaledHeight), bounds, - &paint, SkCanvas::kFast_SrcRectConstraint); + sampling, &paint, SkCanvas::kFast_SrcRectConstraint); } void Tree::updateBitmapCache(Bitmap& bitmap, bool useStagingData) { |