OLD | NEW |
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_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 <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 Transform GetTargetTransform() const; | 121 Transform GetTargetTransform() const; |
122 | 122 |
123 // The bounds, relative to the parent. | 123 // The bounds, relative to the parent. |
124 void SetBounds(const gfx::Rect& bounds); | 124 void SetBounds(const gfx::Rect& bounds); |
125 const gfx::Rect& bounds() const { return bounds_; } | 125 const gfx::Rect& bounds() const { return bounds_; } |
126 | 126 |
127 // Return the target bounds if animator is running, or the current bounds | 127 // Return the target bounds if animator is running, or the current bounds |
128 // otherwise. | 128 // otherwise. |
129 gfx::Rect GetTargetBounds() const; | 129 gfx::Rect GetTargetBounds() const; |
130 | 130 |
| 131 // Sets/gets whether or not drawing of child layers should be clipped to the |
| 132 // bounds of this layer. |
| 133 void SetMasksToBounds(bool masks_to_bounds); |
| 134 bool GetMasksToBounds() const; |
| 135 |
131 // The opacity of the layer. The opacity is applied to each pixel of the | 136 // The opacity of the layer. The opacity is applied to each pixel of the |
132 // texture (resulting alpha = opacity * alpha). | 137 // texture (resulting alpha = opacity * alpha). |
133 float opacity() const { return opacity_; } | 138 float opacity() const { return opacity_; } |
134 void SetOpacity(float opacity); | 139 void SetOpacity(float opacity); |
135 | 140 |
136 // Return the target opacity if animator is running, or the current opacity | 141 // Return the target opacity if animator is running, or the current opacity |
137 // otherwise. | 142 // otherwise. |
138 float GetTargetOpacity() const; | 143 float GetTargetOpacity() const; |
139 | 144 |
140 // Sets the visibility of the Layer. A Layer may be visible but not | 145 // Sets the visibility of the Layer. A Layer may be visible but not |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_GFX_COMPOSITOR_LAYER_H_ | 306 #endif // UI_GFX_COMPOSITOR_LAYER_H_ |
OLD | NEW |