Update the fuzzers to use the flag SurfaceTypes
We are currently limitig the use of IGBPs outside of libgui to allow for
further development of bufferqueues without external breakages. More
information at go/warren-buffers.
BYPASS_IGBP_IGBC_API_REASON: this CL is part of the migration.
Bug: 342197851
Test: atest camera_client_test
Flag: com.android.graphics.libgui.flags.wb_libcameraservice
Change-Id: Ic922a8ac5a1cf35b2fbc92f63366da9ccaa84445
diff --git a/libs/gui/Flags.cpp b/libs/gui/Flags.cpp
index 85ee2cd..ee2802f 100644
--- a/libs/gui/Flags.cpp
+++ b/libs/gui/Flags.cpp
@@ -29,6 +29,14 @@
#endif
}
+ParcelableSurfaceType surfaceToParcelableSurfaceType(const sp<Surface>& surface) {
+#if WB_LIBCAMERASERVICE_WITH_DEPENDENCIES
+ return view::Surface::fromSurface(surface);
+#else
+ return surface->getIGraphicBufferProducer();
+#endif
+}
+
sp<IGraphicBufferProducer> surfaceTypeToIGBP(const sp<SurfaceType>& surface) {
#if WB_LIBCAMERASERVICE_WITH_DEPENDENCIES
return surface->getIGraphicBufferProducer();