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

Unified Diff: components/exo/surface.h

Issue 1548163002: exo: Add Surface::SetBufferScale. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | components/exo/surface.cc » ('j') | components/exo/surface.cc » ('J')
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 99336c568302a13c6e72e6ee83c361e35ed039d8..9868a555efd2c7586e24be93c3c51d0b3ae3f5e7 100644
--- a/components/exo/surface.h
+++ b/components/exo/surface.h
@@ -55,6 +55,12 @@ class Surface : public aura::Window, public ui::CompositorObserver {
// This sets the region of the surface that contains opaque content.
void SetOpaqueRegion(const SkRegion& region);
+ // This sets the scaling factor used to interpret the contents of the buffer
+ // attached to the surface. Note that if the scale is larger than 1, then you
+ // have to attach a buffer that is larger (by a factor of scale in each
+ // dimension) than the desired surface size.
+ void SetBufferScale(float scale);
+
// Functions that control sub-surface state. All sub-surface state is
// double-buffered and will be applied when Commit() is called.
void AddSubSurface(Surface* sub_surface);
@@ -139,6 +145,9 @@ class Surface : public aura::Window, public ui::CompositorObserver {
// The opaque region to take effect when Commit() is called.
SkRegion pending_opaque_region_;
+ // The buffer scaling factor to take effect when Commit() is called.
+ float pending_buffer_scale_;
+
// The stack of sub-surfaces to take effect when Commit() is called.
// Bottom-most sub-surface at the front of the list and top-most sub-surface
// at the back.
« no previous file with comments | « no previous file | components/exo/surface.cc » ('j') | components/exo/surface.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698