Skip to content

Commit 9418037

Browse files
Jamie GennisThe Android Automerger
authored andcommitted
SurfaceMediaSource: use the HW_TEXTURE usage bit
This change makes SurfaceMediaSource request Gralloc buffers with the HW_TEXTURE usage bit rather than the VIDEO_ENCODER bit. It is a temporary workaround for what is likely a Gralloc bug. Bug: 5771063 Change-Id: I9cce615e80fc14a1644fae27ba06970c262dd179
1 parent ce2ac73 commit 9418037

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

media/libstagefright/SurfaceMediaSource.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
336336
(uint32_t(buffer->height) != h) ||
337337
(uint32_t(buffer->format) != format) ||
338338
((uint32_t(buffer->usage) & usage) != usage)) {
339-
usage |= GraphicBuffer::USAGE_HW_VIDEO_ENCODER;
339+
// XXX: This will be changed to USAGE_HW_VIDEO_ENCODER once driver
340+
// issues with that flag get fixed.
341+
usage |= GraphicBuffer::USAGE_HW_TEXTURE;
340342
status_t error;
341343
sp<GraphicBuffer> graphicBuffer(
342344
mGraphicBufferAlloc->createGraphicBuffer(

0 commit comments

Comments
 (0)