Merge "Set the external display usage bit in Stagefright."

This commit is contained in:
Jamie Gennis
2010-11-18 15:42:59 -08:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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));