diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-01 03:45:48 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-01 03:45:48 +0000 |
commit | eb80cbdc7faf7ca07ae3afb3d131714f43a8a8ad (patch) | |
tree | a5ce86d9063d087df8d67ac7747c4044baad7b93 /chromeos/display | |
parent | 2221818610bf5b21f97132718aeb631f92130111 (diff) | |
download | chromium_src-eb80cbdc7faf7ca07ae3afb3d131714f43a8a8ad.zip chromium_src-eb80cbdc7faf7ca07ae3afb3d131714f43a8a8ad.tar.gz chromium_src-eb80cbdc7faf7ca07ae3afb3d131714f43a8a8ad.tar.bz2 |
Don't reconfigure framebuffer if the size is the same
BUG=none
TEST=manual
Review URL: https://chromiumcodereview.appspot.com/12380041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185447 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/display')
-rw-r--r-- | chromeos/display/output_configurator.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chromeos/display/output_configurator.cc b/chromeos/display/output_configurator.cc index 8bb89bf..00c0f72 100644 --- a/chromeos/display/output_configurator.cc +++ b/chromeos/display/output_configurator.cc @@ -226,10 +226,15 @@ void CreateFrameBuffer(Display* display, CrtcConfig* config1, CrtcConfig* config2) { TRACE_EVENT0("chromeos", "OutputConfigurator::CreateFrameBuffer"); - VLOG(1) << "CreateFrameBuffer " << width << " by " << height; - DestroyUnusedCrtcs(display, screen, window, config1, config2); + int current_width = DisplayWidth(display, DefaultScreen(display)); + int current_height = DisplayHeight(display, DefaultScreen(display)); + VLOG(1) << "CreateFrameBuffer " << width << " x " << height + << " (current=" << current_width << " x " << current_height << ")"; + if (width == current_width && height == current_height) + return; + DestroyUnusedCrtcs(display, screen, window, config1, config2); int mm_width = width * kPixelsToMmScale; int mm_height = height * kPixelsToMmScale; XRRSetScreenSize(display, window, width, height, mm_width, mm_height); |