From f6a8037cfa313a8df444791bb11835473653379e Mon Sep 17 00:00:00 2001 From: Jim Shargo Date: Fri, 21 Feb 2025 21:07:04 +0000 Subject: 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 --- libs/gui/ConsumerBase.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'libs/gui/ConsumerBase.cpp') 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 ConsumerBase::getSidebandStream() const { Mutex::Autolock _l(mMutex); -- cgit v1.2.3-59-g8ed1b