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

Unified Diff: ui/compositor/layer_animator.h

Issue 1533643003: CC Animations: Port UI Browser Compositor to use compositor animation timelines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eventobserver
Patch Set: Rebase. Created 5 years 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 | « ui/compositor/layer_animation_delegate.h ('k') | ui/compositor/layer_animator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animator.h
diff --git a/ui/compositor/layer_animator.h b/ui/compositor/layer_animator.h
index 1c92ac0f14c6c9c2938598eb2a4481146433a532..897bff9e5e1eb9a479d3c1e1ca45fae786b9a32c 100644
--- a/ui/compositor/layer_animator.h
+++ b/ui/compositor/layer_animator.h
@@ -20,6 +20,9 @@
#include "ui/gfx/animation/tween.h"
namespace cc {
+class Animation;
+class AnimationPlayer;
+class AnimationTimeline;
class Layer;
}
@@ -30,6 +33,7 @@ class Transform;
}
namespace ui {
+class Compositor;
class Layer;
class LayerAnimationSequence;
class LayerAnimationDelegate;
@@ -107,6 +111,16 @@ class COMPOSITOR_EXPORT LayerAnimator
// Unsubscribe from |cc_layer_| and subscribe to |new_layer|.
void SwitchToLayer(scoped_refptr<cc::Layer> new_layer);
+ // Attach AnimationPlayer to Layer and AnimationTimeline
+ void SetCompositor(Compositor* compositor);
+ // Detach AnimationPlayer from Layer and AnimationTimeline
+ void ResetCompositor(Compositor* compositor);
+
+ // TODO(loyso): Rework it as an implementation for
+ // LayerThreadedAnimationDelegate and make it private.
+ void AddThreadedAnimation(scoped_ptr<cc::Animation> animation);
+ void RemoveThreadedAnimation(int animation_id);
+
// Sets the animation preemption strategy. This determines the behaviour if
// a property is set during an animation. The default is
// IMMEDIATELY_SET_NEW_TARGET (see ImmediatelySetNewTarget below).
@@ -324,12 +338,18 @@ class COMPOSITOR_EXPORT LayerAnimator
// LayerAnimationEventObserver
void OnAnimationStarted(const cc::AnimationEvent& event) override;
+ void AttachLayerToAnimationPlayer(int layer_id);
+ void DetachLayerFromAnimationPlayer();
+
// This is the queue of animations to run.
AnimationQueue animation_queue_;
// The target of all layer animations.
LayerAnimationDelegate* delegate_;
+ // Plays CC animations.
+ scoped_refptr<cc::AnimationPlayer> animation_player_;
+
// The currently running animations.
RunningAnimations running_animations_;
« no previous file with comments | « ui/compositor/layer_animation_delegate.h ('k') | ui/compositor/layer_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698