diff options
| author | 2020-03-10 21:27:08 +0000 | |
|---|---|---|
| committer | 2020-03-10 21:27:08 +0000 | |
| commit | ee45de3115dbae90dcd74732cac443a2a1364e1d (patch) | |
| tree | 140597c09c84e4cea6b9700fbd0b2dfab451ffc0 /libs/hwui/Readback.cpp | |
| parent | 26db1f927888aebcea8a6831e025bc782edc0e75 (diff) | |
| parent | a74d637df14aed6b767828f0cdd19f139013db7f (diff) | |
Merge "Let LayerDrawable choose the best scaling filter for readback." into rvc-dev
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; } |