summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/browser/gpu/gpu_data_manager_impl.cc3
-rw-r--r--content/renderer/render_view_impl.cc16
2 files changed, 7 insertions, 12 deletions
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
index a2a320c..8c05064 100644
--- a/content/browser/gpu/gpu_data_manager_impl.cc
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
@@ -184,6 +184,9 @@ void GpuDataManagerImpl::AppendRendererCommandLine(
if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) &&
!command_line->HasSwitch(switches::kDisableAccelerated2dCanvas))
command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas);
+ if ((flags & content::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) &&
+ !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode))
+ command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
}
void GpuDataManagerImpl::AppendGpuCommandLine(
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 9ad4497..daf5848 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -2403,18 +2403,10 @@ WebMediaPlayer* RenderViewImpl::createMediaPlayer(
collection->AddAudioRenderer(audio_renderer);
}
- // Accelerated video decode is not enabled by default on Linux.
- // crbug.com/137247
- bool use_accelerated_video_decode = false;
-#if defined(OS_CHROMEOS) || defined(OS_WIN)
- use_accelerated_video_decode = true;
-#endif
- use_accelerated_video_decode &= !CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableAcceleratedVideoDecode);
- WebGraphicsContext3DCommandBufferImpl* context3d =
- use_accelerated_video_decode ?
- RenderThreadImpl::current()->GetGpuVDAContext3D() :
- NULL;
+ WebGraphicsContext3DCommandBufferImpl* context3d = NULL;
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableAcceleratedVideoDecode))
+ context3d = RenderThreadImpl::current()->GetGpuVDAContext3D();
if (context3d) {
scoped_refptr<base::MessageLoopProxy> factories_loop =
RenderThreadImpl::current()->compositor_thread() ?