Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80418c13 authored by Carlos Martinez Romero's avatar Carlos Martinez Romero Committed by Android (Google) Code Review
Browse files

Merge "Update the fuzzers to use the flag SurfaceTypes" into main

parents a6b297ee 8c9f7f57
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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();
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ typedef android::sp<android::IGraphicBufferProducer> ParcelableSurfaceType;

namespace flagtools {
sp<SurfaceType> surfaceToSurfaceType(const sp<Surface>& surface);
ParcelableSurfaceType surfaceToParcelableSurfaceType(const sp<Surface>& surface);
ParcelableSurfaceType toParcelableSurfaceType(const view::Surface& surface);
sp<IGraphicBufferProducer> surfaceTypeToIGBP(const sp<SurfaceType>& surface);
bool isSurfaceTypeValid(const sp<SurfaceType>& surface);