From ef8060fcad63b9b6c8ed8e2615d09ecfa01f6263 Mon Sep 17 00:00:00 2001 From: Hung-ying Tyan Date: Tue, 25 Jan 2022 08:48:34 +0000 Subject: Revert "CTS of CtsMediaTestCases#android.media.cts.DecodeAccuracyTest may fail when video is cropped." This reverts commit b48d4d10abfd1af41d8226939f12b6af5e243dff. Reason for revert: the original CL caused regression on many devices. Bug: 206079174 Bug: 207083066 Bug: 192912975 Bug: 208373431 Bug: 209522191 Bug: 208140353 Bug: 208741105 Bug: 211528580 Bug: 211837929 Bug: 211566842 Change-Id: I65206c683f1f067365a4993fa8d2dbd3cffc17cb --- libs/hwui/Readback.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/libs/hwui/Readback.cpp b/libs/hwui/Readback.cpp index d897e94f969f..e08b99d52cdb 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 { @@ -73,20 +71,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); -- cgit v1.2.3-59-g8ed1b