Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: ash/display/display_controller.cc

Issue 853773002: Always redraw the content when display configuration has changed (Closed) Base URL: https://chromium.googlesource.com/chromium/src@2272
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/display/display_controller.h" 5 #include "ash/display/display_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 CreateRootWindowTransformerForDisplay(host->window(), display)); 146 CreateRootWindowTransformerForDisplay(host->window(), display));
147 ash_host->SetRootWindowTransformer(transformer.Pass()); 147 ash_host->SetRootWindowTransformer(transformer.Pass());
148 148
149 DisplayMode mode = 149 DisplayMode mode =
150 GetDisplayManager()->GetActiveModeForDisplayId(display.id()); 150 GetDisplayManager()->GetActiveModeForDisplayId(display.id());
151 if (mode.refresh_rate > 0.0f) { 151 if (mode.refresh_rate > 0.0f) {
152 host->compositor()->vsync_manager()->SetAuthoritativeVSyncInterval( 152 host->compositor()->vsync_manager()->SetAuthoritativeVSyncInterval(
153 base::TimeDelta::FromMicroseconds( 153 base::TimeDelta::FromMicroseconds(
154 base::Time::kMicrosecondsPerSecond / mode.refresh_rate)); 154 base::Time::kMicrosecondsPerSecond / mode.refresh_rate));
155 } 155 }
156
157 // Just movnig the display requires the full redraw.
158 // chrome-os-partner:33558.
159 host->compositor()->ScheduleFullRedraw();
156 } 160 }
157 161
158 void ClearDisplayPropertiesOnHost(AshWindowTreeHost* ash_host, 162 void ClearDisplayPropertiesOnHost(AshWindowTreeHost* ash_host,
159 const gfx::Display& display) { 163 const gfx::Display& display) {
160 #if defined(OS_CHROMEOS) && defined(USE_OZONE) 164 #if defined(OS_CHROMEOS) && defined(USE_OZONE)
161 aura::WindowTreeHost* host = ash_host->AsWindowTreeHost(); 165 aura::WindowTreeHost* host = ash_host->AsWindowTreeHost();
162 ui::CursorController::GetInstance()->ClearCursorConfigForWindow( 166 ui::CursorController::GetInstance()->ClearCursorConfigForWindow(
163 host->GetAcceleratedWidget()); 167 host->GetAcceleratedWidget());
164 #endif 168 #endif
165 } 169 }
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 std::string name = 810 std::string name =
807 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; 811 root_windows[i] == primary ? "aura_root_0" : "aura_root_x";
808 gfx::AcceleratedWidget xwindow = 812 gfx::AcceleratedWidget xwindow =
809 root_windows[i]->GetHost()->GetAcceleratedWidget(); 813 root_windows[i]->GetHost()->GetAcceleratedWidget();
810 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str()); 814 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str());
811 } 815 }
812 #endif 816 #endif
813 } 817 }
814 818
815 } // namespace ash 819 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698