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

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: 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/frame_generator.h
diff --git a/services/ui/ws/frame_generator.h b/services/ui/ws/frame_generator.h
index c93e1220826edcaf3a49b64ad34c10ae9980409c..6de5770dd4b0a2703a86f7ea4ce57dbf906c03f6 100644
--- a/services/ui/ws/frame_generator.h
+++ b/services/ui/ws/frame_generator.h
@@ -49,7 +49,9 @@ class ServerWindow;
class FrameGenerator : public ServerWindowTracker,
public cc::mojom::MojoCompositorFrameSinkClient {
public:
- FrameGenerator(FrameGeneratorDelegate* delegate, ServerWindow* root_window);
+ FrameGenerator(FrameGeneratorDelegate* delegate,
+ ServerWindow* root_window,
+ float device_scale_factor);
kylechar 2016/12/05 14:46:11 Instead of adding another parameter to the constru
riajiang 2016/12/09 19:31:44 Done.
~FrameGenerator() override;
// Schedules a redraw for the provided region.
@@ -70,6 +72,8 @@ class FrameGenerator : public ServerWindowTracker,
// CompositorFrame is submitted.
void OnSurfaceCreated(const cc::SurfaceId& surface_id, ServerWindow* window);
+ void UpdateDeviceScaleFactor(float device_scale_factor);
+
private:
friend class ui::ws::test::FrameGeneratorTest;
@@ -120,6 +124,7 @@ class FrameGenerator : public ServerWindowTracker,
FrameGeneratorDelegate* delegate_;
ServerWindow* const root_window_;
+ float device_scale_factor_;
gfx::Size last_submitted_frame_size_;
cc::LocalFrameId local_frame_id_;

Powered by Google App Engine
This is Rietveld 408576698