summaryrefslogtreecommitdiffstats
path: root/content/gpu
diff options
context:
space:
mode:
authorzmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-04 18:27:04 +0000
committerzmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-04 18:27:04 +0000
commit56403c2267df13e707af931a8aca476806404042 (patch)
treed2df874c1101b5781b874179f59121a4671fd0dd /content/gpu
parent9d97e4693192ec1985d52cba2fd94eee31189841 (diff)
downloadchromium_src-56403c2267df13e707af931a8aca476806404042.zip
chromium_src-56403c2267df13e707af931a8aca476806404042.tar.gz
chromium_src-56403c2267df13e707af931a8aca476806404042.tar.bz2
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
Diffstat (limited to 'content/gpu')
-rw-r--r--content/gpu/gpu_child_thread.cc9
-rw-r--r--content/gpu/gpu_info_collector.cc2
2 files changed, 5 insertions, 6 deletions
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<gfx::GLContext> InitializeGLContext(gfx::GLSurface* surface) {
scoped_refptr<gfx::GLContext> context(
gfx::GLContext::CreateGLContext(NULL,
surface,
- gfx::PreferDiscreteGpu));
+ gfx::PreferIntegratedGpu));
if (!context.get()) {
LOG(ERROR) << "gfx::GLContext::CreateGLContext failed";
return NULL;