summaryrefslogtreecommitdiff
path: root/libs/gui/Flags.cpp
diff options
context:
space:
mode:
author Carlos Martinez Romero <carlosmr@google.com> 2024-12-10 18:35:38 -0800
committer Carlos Martinez Romero <carlosmr@google.com> 2024-12-10 18:35:38 -0800
commit8c9f7f57fba6e308e8423d5234550d7fe01b965e (patch)
tree3fa0ecf84ca0244f48e1ee59411c3dc00fed5118 /libs/gui/Flags.cpp
parent125c5f3ab77b7b6071a283ad7a5dce7118a8709b (diff)
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
Diffstat (limited to 'libs/gui/Flags.cpp')
-rw-r--r--libs/gui/Flags.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/gui/Flags.cpp b/libs/gui/Flags.cpp
index 85ee2cddad..ee2802f706 100644
--- a/libs/gui/Flags.cpp
+++ b/libs/gui/Flags.cpp
@@ -29,6 +29,14 @@ sp<SurfaceType> surfaceToSurfaceType(const sp<Surface>& surface) {
#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();