summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Naresh Kumar Podishetty (xWF) <podishettyk@google.com> 2025-03-16 23:49:02 -0700
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-03-16 23:49:02 -0700
commit515c90dc0b1ce19fc705572ecb1b2336d3d88c43 (patch)
treebf30c417b6d531787ae81377a7426ccbbf8b35ea
parent77477858a7e5fd025680b7534af70637e9e0328e (diff)
Revert "Make ReliableSurface's fallback buffer match ANW size"
This reverts commit 77477858a7e5fd025680b7534af70637e9e0328e. Reason for revert: <Droid monitor: Likely culprit for b/403616834 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.> Change-Id: I495eae72dc0054bc6fff664c504e1305c269ce3f
-rw-r--r--libs/hwui/renderthread/ReliableSurface.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/libs/hwui/renderthread/ReliableSurface.cpp b/libs/hwui/renderthread/ReliableSurface.cpp
index 01e8010444c0..64d38b9ef466 100644
--- a/libs/hwui/renderthread/ReliableSurface.cpp
+++ b/libs/hwui/renderthread/ReliableSurface.cpp
@@ -149,25 +149,9 @@ ANativeWindowBuffer* ReliableSurface::acquireFallbackBuffer(int error) {
return AHardwareBuffer_to_ANativeWindowBuffer(mScratchBuffer.get());
}
- int width = -1;
- int result = mWindow->query(mWindow, NATIVE_WINDOW_DEFAULT_WIDTH, &width);
- if (result != OK || width < 0) {
- ALOGW("Failed to query window default width: %s (%d) value=%d", strerror(-result), result,
- width);
- width = 1;
- }
-
- int height = -1;
- result = mWindow->query(mWindow, NATIVE_WINDOW_DEFAULT_HEIGHT, &height);
- if (result != OK || height < 0) {
- ALOGW("Failed to query window default height: %s (%d) value=%d", strerror(-result), result,
- height);
- height = 1;
- }
-
AHardwareBuffer_Desc desc = AHardwareBuffer_Desc{
- .width = static_cast<uint32_t>(width),
- .height = static_cast<uint32_t>(height),
+ .width = 1,
+ .height = 1,
.layers = 1,
.format = mFormat,
.usage = mUsage,
@@ -176,9 +160,9 @@ ANativeWindowBuffer* ReliableSurface::acquireFallbackBuffer(int error) {
};
AHardwareBuffer* newBuffer;
- result = AHardwareBuffer_allocate(&desc, &newBuffer);
+ int result = AHardwareBuffer_allocate(&desc, &newBuffer);
- if (result != OK) {
+ if (result != NO_ERROR) {
// Allocate failed, that sucks
ALOGW("Failed to allocate scratch buffer, error=%d", result);
return nullptr;