| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // properties are set. It also manages a queue of pending animations and | 141 // properties are set. It also manages a queue of pending animations and |
| 142 // handles blending of animations. The layer takes ownership of the animator. | 142 // handles blending of animations. The layer takes ownership of the animator. |
| 143 void SetAnimator(LayerAnimator* animator); | 143 void SetAnimator(LayerAnimator* animator); |
| 144 | 144 |
| 145 // Returns the layer's animator. Creates a default animator of one has not | 145 // Returns the layer's animator. Creates a default animator of one has not |
| 146 // been set. Will not return NULL. | 146 // been set. Will not return NULL. |
| 147 LayerAnimator* GetAnimator(); | 147 LayerAnimator* GetAnimator(); |
| 148 | 148 |
| 149 // The transform, relative to the parent. | 149 // The transform, relative to the parent. |
| 150 void SetTransform(const gfx::Transform& transform); | 150 void SetTransform(const gfx::Transform& transform); |
| 151 gfx::Transform transform() const; | 151 const gfx::Transform& transform() const { return cc_layer_->transform(); } |
| 152 | 152 |
| 153 gfx::PointF position() const { return cc_layer_->position(); } | 153 gfx::PointF position() const { return cc_layer_->position(); } |
| 154 | 154 |
| 155 // Return the target transform if animator is running, or the current | 155 // Return the target transform if animator is running, or the current |
| 156 // transform otherwise. | 156 // transform otherwise. |
| 157 gfx::Transform GetTargetTransform() const; | 157 gfx::Transform GetTargetTransform() const; |
| 158 | 158 |
| 159 // The bounds, relative to the parent. | 159 // The bounds, relative to the parent. |
| 160 void SetBounds(const gfx::Rect& bounds); | 160 void SetBounds(const gfx::Rect& bounds); |
| 161 const gfx::Rect& bounds() const { return bounds_; } | 161 const gfx::Rect& bounds() const { return bounds_; } |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 539 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
| 540 // or SetTextureMailbox was called. | 540 // or SetTextureMailbox was called. |
| 541 gfx::Size frame_size_in_dip_; | 541 gfx::Size frame_size_in_dip_; |
| 542 | 542 |
| 543 DISALLOW_COPY_AND_ASSIGN(Layer); | 543 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 544 }; | 544 }; |
| 545 | 545 |
| 546 } // namespace ui | 546 } // namespace ui |
| 547 | 547 |
| 548 #endif // UI_COMPOSITOR_LAYER_H_ | 548 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |