summaryrefslogtreecommitdiff
path: root/libs/hwui/Readback.cpp
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2022-01-27 09:28:29 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-01-27 09:28:29 +0000
commitcabe7e39f7ce62e55959760d987ca05b680b38cb (patch)
tree7166334c9e0cf0e26832f6bcabfb441f26256365 /libs/hwui/Readback.cpp
parent01c5895d41c6016c4efd4040c3e682a6b048cee6 (diff)
parentc736d8d0d5d7e47727bfbc5ae85be714508f8db9 (diff)
Merge "Revert "CTS of CtsMediaTestCases#android.media.cts.DecodeAccuracyTest may fail when video is cropped."" am: fbc849e9d8 am: 423a67e7aa am: 611cfb5d99 am: c736d8d0d5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1959133 Change-Id: I31e6dcc0f08c151de7ee6df1ce914e22db5cf682
Diffstat (limited to 'libs/hwui/Readback.cpp')
-rw-r--r--libs/hwui/Readback.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/libs/hwui/Readback.cpp b/libs/hwui/Readback.cpp
index 2b685bf20189..4cce87ad1a2f 100644
--- a/libs/hwui/Readback.cpp
+++ b/libs/hwui/Readback.cpp
@@ -32,8 +32,6 @@
using namespace android::uirenderer::renderthread;
-static constexpr bool sEnableExtraCropInset = true;
-
namespace android {
namespace uirenderer {
@@ -66,20 +64,6 @@ CopyResult Readback::copySurfaceInto(ANativeWindow* window, const Rect& inSrcRec
ALOGW("Surface doesn't have any previously queued frames, nothing to readback from");
return CopyResult::SourceEmpty;
}
-
- if (sEnableExtraCropInset &&
- (cropRect.right - cropRect.left != bitmap->width() ||
- cropRect.bottom - cropRect.top != bitmap->height())) {
- /*
- * When we need use filtering, we should also make border shrink here like gui.
- * But we could not check format for YUV or RGB here... Just use 1 pix.
- */
- cropRect.left += 0.5f;
- cropRect.top += 0.5f;
- cropRect.right -= 0.5f;
- cropRect.bottom -= 0.5f;
- }
-
UniqueAHardwareBuffer sourceBuffer{rawSourceBuffer};
AHardwareBuffer_Desc description;
AHardwareBuffer_describe(sourceBuffer.get(), &description);