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

Unified Diff: services/ui/ws/platform_display_default.cc

Issue 2547243002: Set device scale factor in CompositorFrame and scale frame size in WS. (Closed)
Patch Set: comments Created 4 years 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: services/ui/ws/platform_display_default.cc
diff --git a/services/ui/ws/platform_display_default.cc b/services/ui/ws/platform_display_default.cc
index 415306896fd640e559b21ce860768df1f1898fdd..b83f2ddc9e82eaf56efb5c2841f6f9b46959c881 100644
--- a/services/ui/ws/platform_display_default.cc
+++ b/services/ui/ws/platform_display_default.cc
@@ -36,6 +36,8 @@ PlatformDisplayDefault::PlatformDisplayDefault(
#endif
frame_generator_(new FrameGenerator(this, init_params.root_window)),
metrics_(init_params.metrics) {
+ frame_generator_->set_device_scale_factor(
+ init_params.metrics.device_scale_factor);
}
PlatformDisplayDefault::~PlatformDisplayDefault() {
@@ -141,6 +143,7 @@ bool PlatformDisplayDefault::UpdateViewportMetrics(
}
metrics_ = metrics;
+ frame_generator_->set_device_scale_factor(metrics_.device_scale_factor);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698