summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueueProducer.cpp
diff options
context:
space:
mode:
author Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-03-13 16:16:20 -0700
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-03-13 16:16:20 -0700
commita8d69a444971eeb4c4d46799b1e5ee1c76c70efc (patch)
tree0cef70b9bc869d499d3eb69258fd49ffc4b902df /libs/gui/BufferQueueProducer.cpp
parent7a9ccc9667c53231261ffc60ad524fdc16bb9e0d (diff)
parent329c7f944e41f99950be0cea5d6a3e67ef358669 (diff)
Snap for 13210474 from 329c7f944e41f99950be0cea5d6a3e67ef358669 to 25Q2-release
Change-Id: I4f0d6bafc0ac56f2a6098305e0587368900ddd06
Diffstat (limited to 'libs/gui/BufferQueueProducer.cpp')
-rw-r--r--libs/gui/BufferQueueProducer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp
index 5961b41478..bcf61e45de 100644
--- a/libs/gui/BufferQueueProducer.cpp
+++ b/libs/gui/BufferQueueProducer.cpp
@@ -364,8 +364,10 @@ status_t BufferQueueProducer::waitForFreeSlotThenRelock(FreeSlotCaller caller,
// Producers are not allowed to dequeue more than
// mMaxDequeuedBufferCount buffers.
// This check is only done if a buffer has already been queued
- if (mCore->mBufferHasBeenQueued &&
- dequeuedCount >= mCore->mMaxDequeuedBufferCount) {
+ using namespace com::android::graphics::libgui::flags;
+ bool flagGatedBufferHasBeenQueued =
+ bq_always_use_max_dequeued_buffer_count() || mCore->mBufferHasBeenQueued;
+ if (flagGatedBufferHasBeenQueued && dequeuedCount >= mCore->mMaxDequeuedBufferCount) {
// Supress error logs when timeout is non-negative.
if (mDequeueTimeout < 0) {
BQ_LOGE("%s: attempting to exceed the max dequeued buffer "