summaryrefslogtreecommitdiff
path: root/libs/gui/Flags.cpp
diff options
context:
space:
mode:
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();