summaryrefslogtreecommitdiff
path: root/libs/hwui/Readback.cpp
diff options
context:
space:
mode:
author ramindani <ramindani@google.com> 2021-07-16 22:33:25 +0000
committer Ram Indani <ramindani@google.com> 2021-08-03 20:32:16 +0000
commitef54c038e1d650c000ee97fd5652eee98e9b8c32 (patch)
tree3ea1ba5a36c58da2da9b68af03f27d5be68a7a57 /libs/hwui/Readback.cpp
parent3daec282d77c293774f28de766bb7b1aeadfb294 (diff)
Added crop rect to LayerDrawable to not crop TextureView.
Verified manually with ExoPlayer that TextureView isn't cropping. Test: Did the manual test and atest TextureViewCameraTest atest TextureViewSnapshotTest atest TextureViewStressTest atest TextureViewTest atest PixelCopyTest atest BitmapTest atest HardwareBitmapTests and with HwAccelerationTest Added crop test at ag/15430851 BUG=152621633 Change-Id: If1f448a94908cbf51272bc0d1bbbe1e113fd15f3
Diffstat (limited to 'libs/hwui/Readback.cpp')
-rw-r--r--libs/hwui/Readback.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/libs/hwui/Readback.cpp b/libs/hwui/Readback.cpp
index a743d30939d0..386c88a35d85 100644
--- a/libs/hwui/Readback.cpp
+++ b/libs/hwui/Readback.cpp
@@ -251,8 +251,6 @@ CopyResult Readback::copyHWBitmapInto(Bitmap* hwBitmap, SkBitmap* bitmap) {
Rect srcRect;
Matrix4 transform;
- transform.loadScale(1, -1, 1);
- transform.translate(0, -1);
return copyImageInto(hwBitmap->makeImage(), transform, srcRect, bitmap);
}
@@ -280,8 +278,6 @@ CopyResult Readback::copyLayerInto(DeferredLayerUpdater* deferredLayer, SkBitmap
CopyResult Readback::copyImageInto(const sk_sp<SkImage>& image, SkBitmap* bitmap) {
Rect srcRect;
Matrix4 transform;
- transform.loadScale(1, -1, 1);
- transform.translate(0, -1);
return copyImageInto(image, transform, srcRect, bitmap);
}
@@ -320,7 +316,6 @@ CopyResult Readback::copyImageInto(const sk_sp<SkImage>& image, Matrix4& texTran
Layer layer(mRenderThread.renderState(), nullptr, 255, SkBlendMode::kSrc);
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.