summaryrefslogtreecommitdiff
path: root/libs/gui/ConsumerBase.cpp
diff options
context:
space:
mode:
author Jim Shargo <jshargo@google.com> 2025-02-21 21:07:04 +0000
committer Jim Shargo <jshargo@google.com> 2025-02-24 15:53:28 +0000
commitf6a8037cfa313a8df444791bb11835473653379e (patch)
treefb96b932c021e5b6a61c2d2967bd78a3f50bc10e /libs/gui/ConsumerBase.cpp
parentf4fb32873ebb31905bc7369ee09baaf304dad97d (diff)
BufferItemConsumer: Make creation calls flag-agnostic
It's really annoying to work with these right now since clients have to juggle two flag-guarded constructors. Instead, add a static create function that returns a BIC and a Surface. Also removes flag guards around ConsumerBase::setConsumerIsProtected, which was never necessary and makes it possible to migrate clients away from this flag in their code. BYPASS_IGBP_IGBC_API_REASON=warren buffers Bug: 398822412 Flag: EXEMPT refactor Test: compiles, presubmit Change-Id: I045a8ba804928623fcf7c430be245fd6f2e70bb1
Diffstat (limited to 'libs/gui/ConsumerBase.cpp')
-rw-r--r--libs/gui/ConsumerBase.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/libs/gui/ConsumerBase.cpp b/libs/gui/ConsumerBase.cpp
index 67de742161..0266a3f2e0 100644
--- a/libs/gui/ConsumerBase.cpp
+++ b/libs/gui/ConsumerBase.cpp
@@ -480,7 +480,6 @@ status_t ConsumerBase::setMaxAcquiredBufferCount(int maxAcquiredBuffers) {
return mConsumer->setMaxAcquiredBufferCount(maxAcquiredBuffers);
}
-#if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(WB_CONSUMER_BASE_OWNS_BQ)
status_t ConsumerBase::setConsumerIsProtected(bool isProtected) {
Mutex::Autolock lock(mMutex);
if (mAbandoned) {
@@ -489,7 +488,6 @@ status_t ConsumerBase::setConsumerIsProtected(bool isProtected) {
}
return mConsumer->setConsumerIsProtected(isProtected);
}
-#endif // COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(WB_CONSUMER_BASE_OWNS_BQ)
sp<NativeHandle> ConsumerBase::getSidebandStream() const {
Mutex::Autolock _l(mMutex);