Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Unified Diff: content/renderer/render_thread_impl.cc

Issue 1968933003: Do not create GpuVideoAcceleratorFactories if kDisableGpuCompositing is set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index ee35e8d3fd3ee9969efb6cc66d93c71d77167986..7f873eace568ec81f618b60a8d50e4040ba67455 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1387,6 +1387,11 @@ void RenderThreadImpl::PostponeIdleNotification() {
media::GpuVideoAcceleratorFactories* RenderThreadImpl::GetGpuFactories() {
DCHECK(IsMainThread());
+ // XXX: solution1
+ const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
+ if (cmd_line->HasSwitch(switches::kDisableGpuCompositing))
+ return nullptr;
+
if (!gpu_factories_.empty()) {
scoped_refptr<ContextProviderCommandBuffer> shared_context_provider =
gpu_factories_.back()->ContextProviderMainThread();
@@ -1408,8 +1413,6 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl::GetGpuFactories() {
}
}
- const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
-
scoped_refptr<gpu::GpuChannelHost> gpu_channel_host =
EstablishGpuChannelSync(CAUSE_FOR_GPU_LAUNCH_MEDIA_CONTEXT);
if (!gpu_channel_host)
@@ -1427,6 +1430,8 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl::GetGpuFactories() {
const bool enable_video_accelerator =
!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
const bool enable_gpu_memory_buffer_video_frames =
+ // XXX: solution2
+ // !cmd_line->HasSwitch(switches::kDisableGpuCompositing) &&
#if defined(OS_MACOSX) || defined(OS_LINUX)
!cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames);
#else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698