Merge "Set the external display usage bit in Stagefright."
This commit is contained in:
@@ -1714,7 +1714,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
|
||||
// Set up the native window.
|
||||
// XXX TODO: Get the gralloc usage flags from the OMX plugin!
|
||||
err = native_window_set_usage(
|
||||
mNativeWindow.get(), GRALLOC_USAGE_HW_TEXTURE);
|
||||
mNativeWindow.get(), GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_EXTERNAL_DISP);
|
||||
if (err != 0) {
|
||||
LOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err);
|
||||
return err;
|
||||
|
||||
@@ -88,7 +88,7 @@ SoftwareRenderer::SoftwareRenderer(
|
||||
native_window_set_usage(
|
||||
mSurface.get(),
|
||||
GRALLOC_USAGE_SW_READ_NEVER | GRALLOC_USAGE_SW_WRITE_OFTEN
|
||||
| GRALLOC_USAGE_HW_TEXTURE));
|
||||
| GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_EXTERNAL_DISP));
|
||||
|
||||
CHECK_EQ(0, native_window_set_buffer_count(mSurface.get(), 2));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user