OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GFX_COMPOSITOR_LAYER_H_ | 5 #ifndef UI_GFX_COMPOSITOR_LAYER_H_ |
6 #define UI_GFX_COMPOSITOR_LAYER_H_ | 6 #define UI_GFX_COMPOSITOR_LAYER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 // Return the target bounds if animator is running, or the current bounds | 112 // Return the target bounds if animator is running, or the current bounds |
113 // otherwise. | 113 // otherwise. |
114 gfx::Rect GetTargetBounds() const; | 114 gfx::Rect GetTargetBounds() const; |
115 | 115 |
116 // The opacity of the layer. The opacity is applied to each pixel of the | 116 // The opacity of the layer. The opacity is applied to each pixel of the |
117 // texture (resulting alpha = opacity * alpha). | 117 // texture (resulting alpha = opacity * alpha). |
118 float opacity() const { return opacity_; } | 118 float opacity() const { return opacity_; } |
119 void SetOpacity(float opacity); | 119 void SetOpacity(float opacity); |
120 | 120 |
121 // Return the target opacity if animator is running, or the current bounds | 121 // Return the target opacity if animator is running, or the current opacity |
122 // otherwise. | 122 // otherwise. |
123 float GetTargetOpacity() const; | 123 float GetTargetOpacity() const; |
124 | 124 |
125 // Sets the visibility of the Layer. A Layer may be visible but not | 125 // Sets the visibility of the Layer. A Layer may be visible but not |
126 // drawn. This happens if any ancestor of a Layer is not visible. | 126 // drawn. This happens if any ancestor of a Layer is not visible. |
127 void SetVisible(bool visible); | 127 void SetVisible(bool visible); |
128 bool visible() const { return visible_; } | 128 bool visible() const { return visible_; } |
129 | 129 |
130 // Returns true if this Layer is drawn. A Layer is drawn only if all ancestors | 130 // Returns true if this Layer is drawn. A Layer is drawn only if all ancestors |
131 // are visible. | 131 // are visible. |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 WebKit::WebLayer web_layer_; | 310 WebKit::WebLayer web_layer_; |
311 bool web_layer_is_accelerated_; | 311 bool web_layer_is_accelerated_; |
312 #endif | 312 #endif |
313 | 313 |
314 DISALLOW_COPY_AND_ASSIGN(Layer); | 314 DISALLOW_COPY_AND_ASSIGN(Layer); |
315 }; | 315 }; |
316 | 316 |
317 } // namespace ui | 317 } // namespace ui |
318 | 318 |
319 #endif // UI_GFX_COMPOSITOR_LAYER_H_ | 319 #endif // UI_GFX_COMPOSITOR_LAYER_H_ |
OLD | NEW |