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

Unified Diff: services/ui/ws/frame_generator.h

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/surfaces/display_compositor.cc ('k') | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/frame_generator.h
diff --git a/services/ui/ws/frame_generator.h b/services/ui/ws/frame_generator.h
index 0e872bf7a1ff1341b3ad95fe05b387c2d57d3996..6b0505994690e4cbe104934efd46649cc90e23cb 100644
--- a/services/ui/ws/frame_generator.h
+++ b/services/ui/ws/frame_generator.h
@@ -46,6 +46,10 @@ class FrameGenerator : public ServerWindowTracker,
FrameGenerator(FrameGeneratorDelegate* delegate, ServerWindow* root_window);
~FrameGenerator() override;
+ void set_device_scale_factor(float device_scale_factor) {
+ device_scale_factor_ = device_scale_factor;
+ }
+
// Schedules a redraw for the provided region.
void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget);
@@ -118,6 +122,7 @@ class FrameGenerator : public ServerWindowTracker,
FrameGeneratorDelegate* delegate_;
ServerWindow* const root_window_;
+ float device_scale_factor_ = 1.f;
gfx::Size last_submitted_frame_size_;
cc::LocalFrameId local_frame_id_;
« no previous file with comments | « services/ui/surfaces/display_compositor.cc ('k') | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698