Chromium Code Reviews| Index: cc/layers/layer.h |
| diff --git a/cc/layers/layer.h b/cc/layers/layer.h |
| index 20637642e2f6b7794a7135f462143815f19aa124..eff6d730fa62f3b0b1203b2641cef560052ab2c6 100644 |
| --- a/cc/layers/layer.h |
| +++ b/cc/layers/layer.h |
| @@ -17,9 +17,7 @@ |
| #include "base/macros.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/observer_list.h" |
| -#include "cc/animation/layer_animation_controller.h" |
| -#include "cc/animation/layer_animation_value_observer.h" |
| -#include "cc/animation/layer_animation_value_provider.h" |
| +#include "cc/animation/target_property.h" |
| #include "cc/base/cc_export.h" |
| #include "cc/base/region.h" |
| #include "cc/debug/frame_timing_request.h" |
| @@ -53,9 +51,6 @@ class ConvertableToTraceFormat; |
| namespace cc { |
| -class Animation; |
| -class AnimationDelegate; |
| -struct AnimationEvent; |
| class CopyOutputRequest; |
| class LayerAnimationEventObserver; |
| class LayerClient; |
| @@ -69,7 +64,6 @@ class RenderingStatsInstrumentation; |
| class ResourceUpdateQueue; |
| class ScrollbarLayerInterface; |
| class SimpleEnclosedRegion; |
| -struct AnimationEvent; |
| namespace proto { |
| class LayerNode; |
| @@ -79,9 +73,7 @@ class LayerUpdate; |
| // Base class for composited layers. Special layer types are derived from |
| // this class. |
| -class CC_EXPORT Layer : public base::RefCounted<Layer>, |
| - public LayerAnimationValueObserver, |
| - public LayerAnimationValueProvider { |
| +class CC_EXPORT Layer : public base::RefCounted<Layer> { |
| public: |
| using LayerListType = LayerList; |
| using LayerIdMap = std::unordered_map<int, scoped_refptr<Layer>>; |
| @@ -415,28 +407,7 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>, |
| LayerTreeHost* layer_tree_host() { return layer_tree_host_; } |
| const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } |
| - bool AddAnimation(scoped_ptr<Animation> animation); |
| - void PauseAnimation(int animation_id, double time_offset); |
| - void RemoveAnimation(int animation_id); |
| - void AbortAnimation(int animation_id); |
| - LayerAnimationController* layer_animation_controller() const { |
| - return layer_animation_controller_.get(); |
| - } |
| - void SetLayerAnimationControllerForTest( |
| - scoped_refptr<LayerAnimationController> controller); |
| - |
| - void set_layer_animation_delegate(AnimationDelegate* delegate) { |
| - DCHECK(layer_animation_controller_); |
| - layer_animation_controller_->set_layer_animation_delegate(delegate); |
| - } |
| - |
| bool HasActiveAnimation() const; |
|
loyso (OOO)
2016/03/09 06:11:04
My todo: Rename it to HasActiveAnimationForTesting
|
| - void RegisterForAnimations(AnimationRegistrar* registrar); |
| - |
| - void AddLayerAnimationEventObserver( |
| - LayerAnimationEventObserver* animation_observer); |
| - void RemoveLayerAnimationEventObserver( |
| - LayerAnimationEventObserver* animation_observer); |
| virtual ScrollbarLayerInterface* ToScrollbarLayer(); |
| @@ -551,22 +522,19 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>, |
| void set_sorted_for_recursion(bool sorted_for_recursion); |
| bool sorted_for_recursion(); |
| - // LayerAnimationValueProvider implementation. |
| - gfx::ScrollOffset ScrollOffsetForAnimation() const override; |
| - |
| - // LayerAnimationValueObserver implementation. |
| - void OnFilterAnimated(const FilterOperations& filters) override; |
| - void OnOpacityAnimated(float opacity) override; |
| - void OnTransformAnimated(const gfx::Transform& transform) override; |
| - void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override; |
| - void OnAnimationWaitingForDeletion() override; |
| - void OnTransformIsPotentiallyAnimatingChanged(bool is_animating) override; |
| - bool IsActive() const override; |
| + // Interactions with attached animations. |
| + gfx::ScrollOffset ScrollOffsetForAnimation() const; |
| + void OnFilterAnimated(const FilterOperations& filters); |
| + void OnOpacityAnimated(float opacity); |
| + void OnTransformAnimated(const gfx::Transform& transform); |
| + void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset); |
| + void OnTransformIsPotentiallyAnimatingChanged(bool is_animating); |
| + bool IsActive() const; |
| protected: |
| friend class LayerImpl; |
| friend class TreeSynchronizer; |
| - ~Layer() override; |
| + virtual ~Layer(); |
| explicit Layer(const LayerSettings& settings); |
| @@ -686,8 +654,6 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>, |
| // updated via SetLayerTreeHost() if a layer moves between trees. |
| LayerTreeHost* layer_tree_host_; |
| - scoped_refptr<LayerAnimationController> layer_animation_controller_; |
| - |
| // Layer properties. |
| gfx::Size bounds_; |