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

Unified Diff: components/exo/surface.h

Issue 2843723003: Make exo::Surface set device_scale_factor. (Closed)
Patch Set: Get device_scale_factor from aura::Window. Created 3 years, 8 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
« no previous file with comments | « no previous file | components/exo/surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/surface.h
diff --git a/components/exo/surface.h b/components/exo/surface.h
index 1b1bd552623de0bdefb180100391de83e7f5d2b9..c22029d32f8fff7eb5123ec2d6cb49e2d4a41a9a 100644
--- a/components/exo/surface.h
+++ b/components/exo/surface.h
@@ -140,6 +140,9 @@ class Surface : public ui::ContextFactoryObserver,
// This sets the alpha value that will be applied to the whole surface.
void SetAlpha(float alpha);
+ // This sets the device scale factor sent in CompositorFrames.
+ void SetDeviceScaleFactor(float device_scale_factor);
+
// Surface state (damage regions, attached buffers, etc.) is double-buffered.
// A Commit() call atomically applies all pending state, replacing the
// current state. Commit() is not guaranteed to be synchronous. See
@@ -314,6 +317,9 @@ class Surface : public ui::ContextFactoryObserver,
// The buffer that will become the content of surface when Commit() is called.
BufferAttachment pending_buffer_;
+ // The device scale factor sent in CompositorFrames.
+ float device_scale_factor_ = 1.0f;
reveman 2017/04/27 21:01:30 Did you verify that this is updated as the |windio
kylechar 2017/04/28 18:02:16 It gets updated when the ui::Layer with |window_|
reveman 2017/04/28 18:06:49 Sounds good. UpdateSurface calls before delegate i
+
const cc::FrameSinkId frame_sink_id_;
cc::LocalSurfaceId local_surface_id_;
« no previous file with comments | « no previous file | components/exo/surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698