| Index: media/gpu/android_video_decode_accelerator.cc
|
| diff --git a/media/gpu/android_video_decode_accelerator.cc b/media/gpu/android_video_decode_accelerator.cc
|
| index d0e34286369a6ba97c6dab30da8678ef646d7c1b..ccb23df7edb5437fe7dc3f5fab400993c0b8f628 100644
|
| --- a/media/gpu/android_video_decode_accelerator.cc
|
| +++ b/media/gpu/android_video_decode_accelerator.cc
|
| @@ -477,9 +477,6 @@ bool AndroidVideoDecodeAccelerator::Initialize(const Config& config,
|
| gles_decoder->GetContextGroup()->gpu_preferences();
|
|
|
| if (UseDeferredRenderingStrategy(gpu_preferences)) {
|
| - // TODO(liberato, watk): Figure out what we want to do about zero copy for
|
| - // fullscreen external SurfaceView in WebView. http://crbug.com/582170.
|
| - DCHECK(!gles_decoder->GetContextGroup()->mailbox_manager()->UsesSync());
|
| DVLOG(1) << __FUNCTION__ << ", using deferred rendering strategy.";
|
| strategy_.reset(new AndroidDeferredRenderingBackingStrategy(this));
|
| } else {
|
| @@ -1578,9 +1575,14 @@ void AndroidVideoDecodeAccelerator::ManageTimer(bool did_work) {
|
| // static
|
| bool AndroidVideoDecodeAccelerator::UseDeferredRenderingStrategy(
|
| const gpu::GpuPreferences& gpu_preferences) {
|
| - // TODO(liberato, watk): Figure out what we want to do about zero copy for
|
| - // fullscreen external SurfaceView in WebView. http://crbug.com/582170.
|
| - return !gpu_preferences.enable_threaded_texture_mailboxes;
|
| + return true;
|
| +}
|
| +
|
| +// static
|
| +bool AndroidVideoDecodeAccelerator::RequiresTextureCopy(
|
| + const gpu::GpuPreferences& gpu_preferences) {
|
| + // http://crbug.com/582170
|
| + return gpu_preferences.enable_threaded_texture_mailboxes;
|
| }
|
|
|
| // static
|
| @@ -1647,6 +1649,10 @@ AndroidVideoDecodeAccelerator::GetCapabilities(
|
| if (UseDeferredRenderingStrategy(gpu_preferences)) {
|
| capabilities.flags |= media::VideoDecodeAccelerator::Capabilities::
|
| NEEDS_ALL_PICTURE_BUFFERS_TO_DECODE;
|
| + if (RequiresTextureCopy(gpu_preferences)) {
|
| + capabilities.flags |=
|
| + media::VideoDecodeAccelerator::Capabilities::REQUIRES_TEXTURE_COPY;
|
| + }
|
| if (media::MediaCodecUtil::IsSurfaceViewOutputSupported()) {
|
| capabilities.flags |= media::VideoDecodeAccelerator::Capabilities::
|
| SUPPORTS_EXTERNAL_OUTPUT_SURFACE;
|
|
|