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

Commit 8add6cf4 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala
Browse files

Set gralloc consumer usage bits in SurfaceMediaSource.

BufferQueue is no longer setting these for its endpoints; set the bits
to GRALLOC_USAGE_HW_VIDEO_ENCODER | GRALLOC_USAGE_HW_TEXTURE.  In the
longer term, the set flags should be just
GRALLOC_USAGE_HW_VIDEO_ENCODER, but that requires other changes.

Change-Id: I4170658de49bf88d829d34605a15684e72a90706
parent 1803c3ae
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -55,6 +55,8 @@ SurfaceMediaSource::SurfaceMediaSource(uint32_t bufferWidth, uint32_t bufferHeig
    mBufferQueue = new BufferQueue(true, MIN_UNDEQUEUED_BUFFERS);
    mBufferQueue->setDefaultBufferSize(bufferWidth, bufferHeight);
    mBufferQueue->setSynchronousMode(true);
    mBufferQueue->setConsumerUsageBits(GRALLOC_USAGE_HW_VIDEO_ENCODER |
            GRALLOC_USAGE_HW_TEXTURE);

    sp<ISurfaceComposer> composer(ComposerService::getComposerService());