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

Unified Diff: ui/compositor/layer_animator.h

Issue 291843012: compositor: Tick the UI animations from cc, instead of from timer callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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
Index: ui/compositor/layer_animator.h
diff --git a/ui/compositor/layer_animator.h b/ui/compositor/layer_animator.h
index a1e0ad2cd44a382a043d4e4de757ef5adf716e33..d8fb88cf3dcc401912b1132a2d74a9db96895a13 100644
--- a/ui/compositor/layer_animator.h
+++ b/ui/compositor/layer_animator.h
@@ -15,7 +15,6 @@
#include "base/time/time.h"
#include "ui/compositor/compositor_export.h"
#include "ui/compositor/layer_animation_element.h"
-#include "ui/gfx/animation/animation_container_element.h"
#include "ui/gfx/animation/tween.h"
namespace gfx {
@@ -40,9 +39,7 @@ class ScopedLayerAnimationSettings;
// ensure that it is not disposed of until it finishes executing. It does this
// by holding a reference to itself for the duration of methods for which it
// must guarantee that |this| is valid.
-class COMPOSITOR_EXPORT LayerAnimator
- : public gfx::AnimationContainerElement,
- public base::RefCounted<LayerAnimator> {
+class COMPOSITOR_EXPORT LayerAnimator : public base::RefCounted<LayerAnimator> {
public:
enum PreemptionStrategy {
IMMEDIATELY_SET_NEW_TARGET,
@@ -188,6 +185,8 @@ class COMPOSITOR_EXPORT LayerAnimator
}
base::TimeTicks last_step_time() const { return last_step_time_; }
+ void Step(base::TimeTicks time_now);
+
protected:
virtual ~LayerAnimator();
@@ -225,11 +224,6 @@ class COMPOSITOR_EXPORT LayerAnimator
typedef std::vector<RunningAnimation> RunningAnimations;
typedef std::deque<linked_ptr<LayerAnimationSequence> > AnimationQueue;
- // Implementation of AnimationContainerElement
- virtual void SetStartTime(base::TimeTicks start_time) OVERRIDE;
- virtual void Step(base::TimeTicks time_now) OVERRIDE;
- virtual base::TimeDelta GetTimerInterval() const OVERRIDE;
-
// Finishes all animations by either advancing them to their final state or by
// aborting them.
void StopAnimatingInternal(bool abort);

Powered by Google App Engine
This is Rietveld 408576698