diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-31 16:17:30 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-31 16:17:30 +0000 |
commit | d30dac8892cd60cd076dc7d0589b5fecf6d534f6 (patch) | |
tree | 2fa81626cc01726209115ec169ff6b5fab5b3bd0 /ash/shell.cc | |
parent | 7990b88d68779a5763656fd6199123042a241c76 (diff) | |
download | chromium_src-d30dac8892cd60cd076dc7d0589b5fecf6d534f6.zip chromium_src-d30dac8892cd60cd076dc7d0589b5fecf6d534f6.tar.gz chromium_src-d30dac8892cd60cd076dc7d0589b5fecf6d534f6.tar.bz2 |
chromeos: Avoid an XRRGetScreenResources() call at startup.
OutputConfigurator::Init() and OutputConfigurator::Start()
both called XRRGetScreenResources() before the message loop
is started. Each call blocks for 60 milliseconds. This
change moves Init()'s code to set the background color into
Start() to reduce this to one call.
(There are still additional calls in
DisplayChangeObserverX11 that should be removed.)
BUG=254667
Review URL: https://chromiumcodereview.appspot.com/21130007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214756 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell.cc')
-rw-r--r-- | ash/shell.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ash/shell.cc b/ash/shell.cc index 0fe57d5..1cf22a4 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -228,9 +228,7 @@ Shell::Shell(ShellDelegate* delegate) CommandLine::ForCurrentProcess()->HasSwitch( ::switches::kDisablePanelFitting); - output_configurator_->Init( - !is_panel_fitting_disabled, - delegate_->IsFirstRunAfterBoot() ? kChromeOsBootColor : 0); + output_configurator_->Init(!is_panel_fitting_disabled); base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( output_configurator()); @@ -458,8 +456,8 @@ void Shell::Init() { output_configurator_->set_state_controller(display_change_observer_.get()); if (!command_line->HasSwitch(ash::switches::kAshDisableSoftwareMirroring)) output_configurator_->set_mirroring_controller(display_manager_.get()); - output_configurator_->Start(); - display_change_observer_->OnDisplayModeChanged(); + output_configurator_->Start( + delegate_->IsFirstRunAfterBoot() ? kChromeOsBootColor : 0); display_initialized = true; } #endif |