diff options
author | Bo Hu <bohu@google.com> | 2024-04-16 09:18:53 -0700 |
---|---|---|
committer | Bo Hu <bohu@google.com> | 2024-04-16 18:06:37 +0000 |
commit | d2049d02aa1f92964fd9d1cd0243e547ff02b9df (patch) | |
tree | f75c673a1656491943ad904c764743a2d5760986 | |
parent | c3407cd72eab0832c6d2b811ce0479386bf0cc31 (diff) | |
download | gfxstream-d2049d02aa1f92964fd9d1cd0243e547ff02b9df.tar.gz |
resizable: clear width, height and number of pixels when skip frames
When we are skipping frames, need to clear those variables
as the callers are depending on them to check whether a
frame is available.
Bug: 296127332
Change-Id: I72e918aab8b0b39df5c0a7ceb2f2e942caff7395
-rw-r--r-- | host/FrameBuffer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/host/FrameBuffer.cpp b/host/FrameBuffer.cpp index 411ddc91..3bab94a7 100644 --- a/host/FrameBuffer.cpp +++ b/host/FrameBuffer.cpp @@ -1987,6 +1987,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); |