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

Unified Diff: ash/display/window_tree_host_manager.cc

Issue 2196923002: Make ash::DisplayMode more like ui::DisplayMode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: ash/display/window_tree_host_manager.cc
diff --git a/ash/display/window_tree_host_manager.cc b/ash/display/window_tree_host_manager.cc
index 79badc2652c2d94ab223ecff0b2e349916c1dbbb..8179cbe72e769f0d7b8e9922f9df2d7008099eca 100644
--- a/ash/display/window_tree_host_manager.cc
+++ b/ash/display/window_tree_host_manager.cc
@@ -136,12 +136,12 @@ void SetDisplayPropertiesOnHost(AshWindowTreeHost* ash_host,
CreateRootWindowTransformerForDisplay(host->window(), display));
ash_host->SetRootWindowTransformer(std::move(transformer));
- DisplayMode mode =
+ scoped_refptr<DisplayMode> mode =
GetDisplayManager()->GetActiveModeForDisplayId(display.id());
- if (mode.refresh_rate > 0.0f) {
+ if (mode && mode->refresh_rate() > 0.0f) {
host->compositor()->SetAuthoritativeVSyncInterval(
base::TimeDelta::FromMicroseconds(base::Time::kMicrosecondsPerSecond /
- mode.refresh_rate));
+ mode->refresh_rate()));
}
// Just movnig the display requires the full redraw.

Powered by Google App Engine
This is Rietveld 408576698