Use the new Surface API instead of IGBP.
This new API allows us to not use IGBPS. See
go/warren-buffers for more details.
Test: atest, run and presubmit
Bug: 342199002
Flag: com.android.graphics.libgui.flags.wb_platform_api_improvements
Change-Id: I49a8dae8fb554e2126a0ea67d1dd10821f6679b7
diff --git a/services/camera/libcameraservice/device3/Camera3OutputStream.cpp b/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
index 54d55a1..04867b9 100644
--- a/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
+++ b/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
@@ -732,7 +732,11 @@
if (res == OK) {
// Disable buffer allocation for this BufferQueue, buffer manager will take over
// the buffer allocation responsibility.
+#if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(WB_PLATFORM_API_IMPROVEMENTS)
+ mConsumer->allowAllocation(false);
+#else
mConsumer->getIGraphicBufferProducer()->allowAllocation(false);
+#endif
mUseBufferManager = true;
} else {
ALOGE("%s: Unable to register stream %d to camera3 buffer manager, "