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

Commit ee0882a4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "libstagefright: add default gralloc usage for detached surface" into main

parents 7560aee2 716bdca6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -6696,8 +6696,8 @@ sp<Surface> MediaCodec::getOrCreateDetachedSurface() {
    if (!mDetachedSurface) {
        uint64_t usage = 0;
        if (!mSurface || mSurface->getConsumerUsage(&usage) != OK) {
            // TODO: should we use a/the default consumer usage?
            usage = 0;
            // By default prepare buffer to be displayed on any of the common surfaces
            usage = (GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_HW_COMPOSER);
        }
        mDetachedSurface.reset(new ReleaseSurface(usage));
    }