Loading libs/gui/Flags.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -76,6 +76,14 @@ sp<SurfaceType> convertParcelableSurfaceTypeToSurface(const ParcelableSurfaceTyp return surface; #endif } } // namespace flagtools namespace mediaflagtools { sp<MediaSurfaceType> igbpToSurfaceType(const sp<IGraphicBufferProducer>& igbp) { #if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(WB_MEDIA_MIGRATION) return new Surface(igbp); #else return igbp; #endif } } // namespace mediaflagtools } // namespace android No newline at end of file libs/gui/include/gui/Flags.h +13 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ class Surface; (WB_CAMERA3_AND_PROCESSORS_WITH_DEPENDENCIES && \ COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(WB_LIBCAMERASERVICE)) // Camera #if WB_LIBCAMERASERVICE_WITH_DEPENDENCIES typedef android::Surface SurfaceType; typedef android::view::Surface ParcelableSurfaceType; Loading @@ -54,4 +55,16 @@ ParcelableSurfaceType convertSurfaceTypeToParcelable(sp<SurfaceType> surface); sp<SurfaceType> convertParcelableSurfaceTypeToSurface(const ParcelableSurfaceType& surface); } // namespace flagtools // Media #if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(WB_MEDIA_MIGRATION) typedef android::Surface MediaSurfaceType; typedef android::view::Surface MediaParcelableSurfaceType; #else typedef android::IGraphicBufferProducer MediaSurfaceType; typedef android::sp<android::IGraphicBufferProducer> MediaParcelableSurfaceType; #endif namespace mediaflagtools { sp<MediaSurfaceType> igbpToSurfaceType(const sp<IGraphicBufferProducer>& igbp); } // namespace mediaflagtools } // namespace android Loading
libs/gui/Flags.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -76,6 +76,14 @@ sp<SurfaceType> convertParcelableSurfaceTypeToSurface(const ParcelableSurfaceTyp return surface; #endif } } // namespace flagtools namespace mediaflagtools { sp<MediaSurfaceType> igbpToSurfaceType(const sp<IGraphicBufferProducer>& igbp) { #if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(WB_MEDIA_MIGRATION) return new Surface(igbp); #else return igbp; #endif } } // namespace mediaflagtools } // namespace android No newline at end of file
libs/gui/include/gui/Flags.h +13 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ class Surface; (WB_CAMERA3_AND_PROCESSORS_WITH_DEPENDENCIES && \ COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(WB_LIBCAMERASERVICE)) // Camera #if WB_LIBCAMERASERVICE_WITH_DEPENDENCIES typedef android::Surface SurfaceType; typedef android::view::Surface ParcelableSurfaceType; Loading @@ -54,4 +55,16 @@ ParcelableSurfaceType convertSurfaceTypeToParcelable(sp<SurfaceType> surface); sp<SurfaceType> convertParcelableSurfaceTypeToSurface(const ParcelableSurfaceType& surface); } // namespace flagtools // Media #if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(WB_MEDIA_MIGRATION) typedef android::Surface MediaSurfaceType; typedef android::view::Surface MediaParcelableSurfaceType; #else typedef android::IGraphicBufferProducer MediaSurfaceType; typedef android::sp<android::IGraphicBufferProducer> MediaParcelableSurfaceType; #endif namespace mediaflagtools { sp<MediaSurfaceType> igbpToSurfaceType(const sp<IGraphicBufferProducer>& igbp); } // namespace mediaflagtools } // namespace android