aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-04-16 22:48:12 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-04-16 22:48:12 +0000
commit01e334b57a04e0f6be3e13bfd7bac53dc15fbf8f (patch)
treef907b837498ee5aa9bd0d8414e0e2fd7cc2b4be5
parentd181c34dad474f23fa744353997020c7109f70c5 (diff)
parentd2049d02aa1f92964fd9d1cd0243e547ff02b9df (diff)
downloadgfxstream-01e334b57a04e0f6be3e13bfd7bac53dc15fbf8f.tar.gz
Merge "resizable: clear width, height and number of pixels when skip frames" into main
-rw-r--r--host/FrameBuffer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/host/FrameBuffer.cpp b/host/FrameBuffer.cpp
index 1e363365..bd600a8b 100644
--- a/host/FrameBuffer.cpp
+++ b/host/FrameBuffer.cpp
@@ -1989,6 +1989,9 @@ int FrameBuffer::getScreenshot(unsigned int nChannels, unsigned int* width, unsi
uint8_t* pixels, size_t* cPixels, int displayId, int desiredWidth,
int desiredHeight, int desiredRotation, Rect rect) {
if (emugl::shouldSkipDraw()) {
+ *width = 0;
+ *height = 0;
+ *cPixels = 0;
return -1;
}
AutoLock mutex(m_lock);