Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3907)

Unified Diff: cc/layers/layer.h

Issue 1130043003: [Sketch] CC Animations: Torpedo the old intrusive animation system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@implscroll
Patch Set: Delete more (headers and animation_registrar_ leftover) Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/blink/web_layer_impl.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.h
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index f393e4bd317a952de04547371da03722a7c756e2..5ccd9dabccce0d0c10c32f1466805085e77144ef 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -12,9 +12,6 @@
#include "base/callback.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/base/cc_export.h"
#include "cc/base/region.h"
#include "cc/base/scoped_ptr_vector.h"
@@ -73,9 +70,7 @@ class OcclusionTracker;
// 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:
typedef RenderSurfaceLayerList RenderSurfaceListType;
typedef LayerList LayerListType;
@@ -417,30 +412,6 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
// Set the priority of all desired textures in this layer.
virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) {}
- bool AddAnimation(scoped_ptr<Animation> animation);
- void PauseAnimation(int animation_id, double time_offset);
- void RemoveAnimation(int animation_id);
- void RemoveAnimation(int animation_id, Animation::TargetProperty property);
- 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;
- void RegisterForAnimations(AnimationRegistrar* registrar,
- const LayerTreeSettings& settings);
-
- void AddLayerAnimationEventObserver(
- LayerAnimationEventObserver* animation_observer);
- void RemoveLayerAnimationEventObserver(
- LayerAnimationEventObserver* animation_observer);
-
virtual SimpleEnclosedRegion VisibleContentOpaqueRegion() const;
virtual ScrollbarLayerInterface* ToScrollbarLayer();
@@ -560,10 +531,16 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
void DidBeginTracing();
+ 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);
+
protected:
friend class LayerImpl;
friend class TreeSynchronizer;
- ~Layer() override;
+ virtual ~Layer();
Layer();
@@ -656,16 +633,7 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
// This should only be called from RemoveFromParent().
void RemoveChildOrDependent(Layer* child);
- // 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;
- bool IsActive() const override;
+ bool HasActiveAnimation() const;
// If this layer has a scroll parent, it removes |this| from its list of
// scroll children.
@@ -683,8 +651,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_;
« no previous file with comments | « cc/blink/web_layer_impl.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698