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

Unified Diff: ui/compositor/layer.h

Issue 10915140: Add the partial screen magnifier to Chrome OS. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Code review fixes Created 8 years, 2 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
Index: ui/compositor/layer.h
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index f9fcbc9208246dbb3eb655747676951ea4f70368..61fdb22586450d35fc7495ebbd4212a333b74ae4 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -168,6 +168,9 @@ class COMPOSITOR_EXPORT Layer
// grayscale otherwise.
float GetTargetGrayscale() const;
+ // Zoom the background by this amount.
+ void SetBackgroundZoom(float x_offset, float y_offset, float zoom, int inset);
+
// Invert the layer.
bool layer_inverted() const { return layer_inverted_; }
void SetLayerInverted(bool inverted);
@@ -326,6 +329,9 @@ class COMPOSITOR_EXPORT Layer
// Set all filters which got applied to the layer.
void SetLayerFilters();
+ // Set all filters which got applied to the layer background.
+ void SetLayerBackgroundFilters();
+
const LayerType type_;
Compositor* compositor_;
@@ -372,6 +378,18 @@ class COMPOSITOR_EXPORT Layer
// while attached to the main layer before the main layer is deleted.
Layer* layer_mask_back_link_;
+ // When the layer is zoomed, this is the offset to the upper left corner of
+ // the area in the layer that is zoomed.
+ float zoom_x_offset_;
+ float zoom_y_offset_;
+
+ // The zoom factor to scale the layer by. Zooming is disabled when this is
+ // set to 1.
+ float zoom_;
+
+ // Width of the border in pixels, where the scaling is blended.
+ int zoom_inset_;
+
std::string name_;
LayerDelegate* delegate_;

Powered by Google App Engine
This is Rietveld 408576698