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_COMPOSITOR_LAYER_H_ | 5 #ifndef UI_COMPOSITOR_LAYER_H_ |
6 #define UI_COMPOSITOR_LAYER_H_ | 6 #define UI_COMPOSITOR_LAYER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // Return the target transform if animator is running, or the current | 144 // Return the target transform if animator is running, or the current |
145 // transform otherwise. | 145 // transform otherwise. |
146 gfx::Transform GetTargetTransform() const; | 146 gfx::Transform GetTargetTransform() const; |
147 | 147 |
148 // The bounds, relative to the parent. | 148 // The bounds, relative to the parent. |
149 void SetBounds(const gfx::Rect& bounds); | 149 void SetBounds(const gfx::Rect& bounds); |
150 const gfx::Rect& bounds() const { return bounds_; } | 150 const gfx::Rect& bounds() const { return bounds_; } |
151 | 151 |
152 // The offset from our parent (stored in bounds.origin()) is an integer but we | 152 // The offset from our parent (stored in bounds.origin()) is an integer but we |
153 // may need to be at a fractional pixel offset to align properly on screen. | 153 // may need to be at a fractional pixel offset to align properly on screen. |
154 void SetSubpixelPositionOffset(const gfx::Vector2dF offset); | 154 void SetSubpixelPositionOffset(const gfx::Vector2dF& offset); |
155 const gfx::Vector2dF& subpixel_position_offset() const { | 155 const gfx::Vector2dF& subpixel_position_offset() const { |
156 return subpixel_position_offset_; | 156 return subpixel_position_offset_; |
157 } | 157 } |
158 | 158 |
159 // Return the target bounds if animator is running, or the current bounds | 159 // Return the target bounds if animator is running, or the current bounds |
160 // otherwise. | 160 // otherwise. |
161 gfx::Rect GetTargetBounds() const; | 161 gfx::Rect GetTargetBounds() const; |
162 | 162 |
163 // Sets/gets whether or not drawing of child layers should be clipped to the | 163 // Sets/gets whether or not drawing of child layers should be clipped to the |
164 // bounds of this layer. | 164 // bounds of this layer. |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 533 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
534 // or SetTextureMailbox was called. | 534 // or SetTextureMailbox was called. |
535 gfx::Size frame_size_in_dip_; | 535 gfx::Size frame_size_in_dip_; |
536 | 536 |
537 DISALLOW_COPY_AND_ASSIGN(Layer); | 537 DISALLOW_COPY_AND_ASSIGN(Layer); |
538 }; | 538 }; |
539 | 539 |
540 } // namespace ui | 540 } // namespace ui |
541 | 541 |
542 #endif // UI_COMPOSITOR_LAYER_H_ | 542 #endif // UI_COMPOSITOR_LAYER_H_ |
OLD | NEW |