From 56403c2267df13e707af931a8aca476806404042 Mon Sep 17 00:00:00 2001 From: "zmo@google.com" Date: Thu, 4 Oct 2012 18:27:04 +0000 Subject: Make about:gpu page reflects the current GPU in real time. This is for Mac with dual GPUs, dynamic switching enabled. BUG= TEST=manually on the affected macs Review URL: https://codereview.chromium.org/11039033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160170 0039d316-1c4b-4281-b951-d872f2087c98 --- content/gpu/gpu_child_thread.cc | 9 ++++----- content/gpu/gpu_info_collector.cc | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'content/gpu') diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc index bb69b45..c21b487a 100644 --- a/content/gpu/gpu_child_thread.cc +++ b/content/gpu/gpu_child_thread.cc @@ -180,11 +180,10 @@ void GpuChildThread::StopWatchdog() { } void GpuChildThread::OnCollectGraphicsInfo() { - if (!gpu_info_.finalized && - (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDisableGpuSandbox) || - CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess) || - CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessGPU))) { + CommandLine* command_line = CommandLine::ForCurrentProcess(); + if (command_line->HasSwitch(switches::kDisableGpuSandbox) || + command_line->ForCurrentProcess()->HasSwitch(switches::kSingleProcess) || + command_line->ForCurrentProcess()->HasSwitch(switches::kInProcessGPU)) { // GPU full info collection should only happen on un-sandboxed GPU process // or single process/in-process gpu mode. diff --git a/content/gpu/gpu_info_collector.cc b/content/gpu/gpu_info_collector.cc index 86ae2f5..14b1697 100644 --- a/content/gpu/gpu_info_collector.cc +++ b/content/gpu/gpu_info_collector.cc @@ -34,7 +34,7 @@ scoped_refptr InitializeGLContext(gfx::GLSurface* surface) { scoped_refptr context( gfx::GLContext::CreateGLContext(NULL, surface, - gfx::PreferDiscreteGpu)); + gfx::PreferIntegratedGpu)); if (!context.get()) { LOG(ERROR) << "gfx::GLContext::CreateGLContext failed"; return NULL; -- cgit v1.1