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

Side by Side Diff: ui/compositor/layer.h

Issue 10201014: Implement High Contrast mode for Chrome OS (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Working implementation Created 8 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_COMPOSITOR_LAYER_H_ 5 #ifndef UI_COMPOSITOR_LAYER_H_
6 #define UI_COMPOSITOR_LAYER_H_ 6 #define UI_COMPOSITOR_LAYER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // The opacity of the layer. The opacity is applied to each pixel of the 125 // The opacity of the layer. The opacity is applied to each pixel of the
126 // texture (resulting alpha = opacity * alpha). 126 // texture (resulting alpha = opacity * alpha).
127 float opacity() const { return opacity_; } 127 float opacity() const { return opacity_; }
128 void SetOpacity(float opacity); 128 void SetOpacity(float opacity);
129 129
130 // Blur pixels by this amount in anything below the layer and visible through 130 // Blur pixels by this amount in anything below the layer and visible through
131 // the layer. 131 // the layer.
132 int background_blur() const { return background_blur_radius_; } 132 int background_blur() const { return background_blur_radius_; }
133 void SetBackgroundBlur(int blur_radius); 133 void SetBackgroundBlur(int blur_radius);
134 134
135 // Invert the layer.
136 bool invert() const { return invert_; }
137 void SetInvert(bool invert);
138
135 // Return the target opacity if animator is running, or the current opacity 139 // Return the target opacity if animator is running, or the current opacity
136 // otherwise. 140 // otherwise.
137 float GetTargetOpacity() const; 141 float GetTargetOpacity() const;
138 142
139 // Sets the visibility of the Layer. A Layer may be visible but not 143 // Sets the visibility of the Layer. A Layer may be visible but not
140 // drawn. This happens if any ancestor of a Layer is not visible. 144 // drawn. This happens if any ancestor of a Layer is not visible.
141 void SetVisible(bool visible); 145 void SetVisible(bool visible);
142 bool visible() const { return visible_; } 146 bool visible() const { return visible_; }
143 147
144 // Returns the target visibility if the animator is running. Otherwise, it 148 // Returns the target visibility if the animator is running. Otherwise, it
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 279
276 // If true the layer is always up to date. 280 // If true the layer is always up to date.
277 bool layer_updated_externally_; 281 bool layer_updated_externally_;
278 282
279 // Union of damaged rects to be used when compositor is ready to 283 // Union of damaged rects to be used when compositor is ready to
280 // paint the content. 284 // paint the content.
281 SkRegion damaged_region_; 285 SkRegion damaged_region_;
282 286
283 float opacity_; 287 float opacity_;
284 int background_blur_radius_; 288 int background_blur_radius_;
289 bool invert_;
285 290
286 std::string name_; 291 std::string name_;
287 292
288 LayerDelegate* delegate_; 293 LayerDelegate* delegate_;
289 294
290 scoped_ptr<LayerAnimator> animator_; 295 scoped_ptr<LayerAnimator> animator_;
291 296
292 WebKit::WebLayer web_layer_; 297 WebKit::WebLayer web_layer_;
293 bool web_layer_is_accelerated_; 298 bool web_layer_is_accelerated_;
294 bool show_debug_borders_; 299 bool show_debug_borders_;
295 300
296 DISALLOW_COPY_AND_ASSIGN(Layer); 301 DISALLOW_COPY_AND_ASSIGN(Layer);
297 }; 302 };
298 303
299 } // namespace ui 304 } // namespace ui
300 305
301 #endif // UI_COMPOSITOR_LAYER_H_ 306 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698