diff options
author | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-20 12:03:13 +0000 |
---|---|---|
committer | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-20 12:03:13 +0000 |
commit | 234edc088932e628236872019450cad68d40a33f (patch) | |
tree | 6da3bcb289cad5e9f780417340345902235de394 /content/browser/browser_main_loop.cc | |
parent | 7d42d6972dad1d05bd3022d7ca32895f07cb0f5f (diff) | |
download | chromium_src-234edc088932e628236872019450cad68d40a33f.zip chromium_src-234edc088932e628236872019450cad68d40a33f.tar.gz chromium_src-234edc088932e628236872019450cad68d40a33f.tar.bz2 |
Disable GPU process prelaunch if browser uses the software compositor
If the browser is using the software compositor, then nothing will use the GPU, so it's pointless to prelaunch it.
BUG=270172
Review URL: https://chromiumcodereview.appspot.com/22893019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218456 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/browser_main_loop.cc')
-rw-r--r-- | content/browser/browser_main_loop.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index 4194aa8..3e5296b 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc @@ -896,8 +896,13 @@ int BrowserMainLoop::BrowserThreadsStarted() { // When running the GPU thread in-process, avoid optimistically starting it // since creating the GPU thread races against creation of the one-and-only // ChildProcess instance which is created by the renderer thread. + bool always_uses_gpu = IsForceCompositingModeEnabled(); +#if defined(USE_AURA) + if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor()) + always_uses_gpu = false; +#endif if (GpuDataManagerImpl::GetInstance()->GpuAccessAllowed(NULL) && - IsForceCompositingModeEnabled() && + always_uses_gpu && !parsed_command_line_.HasSwitch(switches::kDisableGpuProcessPrelaunch) && !parsed_command_line_.HasSwitch(switches::kSingleProcess) && !parsed_command_line_.HasSwitch(switches::kInProcessGPU)) { |