diff options
author | 2020-03-10 22:08:14 +0000 | |
---|---|---|
committer | 2020-03-10 22:08:14 +0000 | |
commit | ae8a59f7fca7a663befc0342c7544b2c2991f265 (patch) | |
tree | df81fceb60f9038c09c3d2c81eb8c3b0cd3ad861 /libs/hwui/Readback.cpp | |
parent | 72b97e37e717a67aabb95fc26e99940ee3eec24d (diff) | |
parent | 2aca970fe99e4228bc1e384917d6be8ed2d2bff5 (diff) |
Merge "Let LayerDrawable choose the best scaling filter for readback." into rvc-dev am: ee45de3115 am: 59f97c80a7 am: 2aca970fe9
Change-Id: Iaaa3f097606e064fad0519d48cb23b384c6932af
Diffstat (limited to 'libs/hwui/Readback.cpp')
-rw-r--r-- | libs/hwui/Readback.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/hwui/Readback.cpp b/libs/hwui/Readback.cpp index 84c07d7d9dff..39900e65cb8a 100644 --- a/libs/hwui/Readback.cpp +++ b/libs/hwui/Readback.cpp @@ -146,12 +146,11 @@ CopyResult Readback::copyImageInto(const sk_sp<SkImage>& image, Matrix4& texTran } Layer layer(mRenderThread.renderState(), nullptr, 255, SkBlendMode::kSrc); - bool disableFilter = MathUtils::areEqual(skiaSrcRect.width(), skiaDestRect.width()) && - MathUtils::areEqual(skiaSrcRect.height(), skiaDestRect.height()); - layer.setForceFilter(!disableFilter); layer.setSize(displayedWidth, displayedHeight); texTransform.copyTo(layer.getTexTransform()); layer.setImage(image); + // Scaling filter is not explicitly set here, because it is done inside copyLayerInfo + // after checking the necessity based on the src/dest rect size and the transformation. if (copyLayerInto(&layer, &skiaSrcRect, &skiaDestRect, bitmap)) { copyResult = CopyResult::Success; } |