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

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: test 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
« no previous file with comments | « services/ui/ws/frame_generator_unittest.cc ('k') | services/ui/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c68d87d841c63d1dd4d19a362dd7e17c3ebf0dd7..8f46a220fc42f1357b1417e5adbd9006c5469532 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() {
@@ -145,6 +147,7 @@ bool PlatformDisplayDefault::UpdateViewportMetrics(
}
metrics_ = metrics;
+ frame_generator_->set_device_scale_factor(metrics_.device_scale_factor);
return true;
}
« no previous file with comments | « services/ui/ws/frame_generator_unittest.cc ('k') | services/ui/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698