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

Commit 4f09510e authored by Hung-ying Tyan's avatar Hung-ying Tyan Committed by Gerrit Code Review
Browse files

Merge "libstagefright: add default gralloc usage for detached surface" into android15-tests-dev

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