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

Unified Diff: ui/gfx/compositor/layer_animator.h

Issue 8400059: Revert 107715 - Enable the new layer animation framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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 | « ui/gfx/compositor/layer_animation_sequence_unittest.cc ('k') | ui/gfx/compositor/layer_animator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/layer_animator.h
===================================================================
--- ui/gfx/compositor/layer_animator.h (revision 107719)
+++ ui/gfx/compositor/layer_animator.h (working copy)
@@ -24,11 +24,11 @@
class Animation;
class Layer;
class LayerAnimationSequence;
-class LayerAnimatorDelegate;
class Transform;
// When a property of layer needs to be changed it is set by way of
-// LayerAnimator. This enables LayerAnimator to animate property changes.
+// LayerAnimator. This enables LayerAnimator to animate property
+// changes.
class COMPOSITOR_EXPORT LayerAnimator : public AnimationContainerElement {
public:
enum PreemptionStrategy {
@@ -50,19 +50,16 @@
// Sets the transform on the delegate. May cause an implicit animation.
virtual void SetTransform(const Transform& transform);
- Transform GetTargetTransform() const;
// Sets the bounds on the delegate. May cause an implicit animation.
virtual void SetBounds(const gfx::Rect& bounds);
- gfx::Rect GetTargetBounds() const;
// Sets the opacity on the delegate. May cause an implicit animation.
virtual void SetOpacity(float opacity);
- float GetTargetOpacity() const;
// Sets the layer animation delegate the animator is associated with. The
// animator does not own the delegate.
- void SetDelegate(LayerAnimatorDelegate* delegate);
+ void SetDelegate(LayerAnimationDelegate* delegate);
// Sets the animation preemption strategy. This determines the behaviour if
// a property is set during an animation. The default is
@@ -85,14 +82,6 @@
// animation sequences.
void ScheduleTogether(const std::vector<LayerAnimationSequence*>& animations);
- // These are cover functions that create sequences for you to wrap the given
- // elements. These sequences are then passed to the corresponding function
- // above.
- void StartAnimationElement(LayerAnimationElement* element);
- void ScheduleAnimationElement(LayerAnimationElement* element);
- void ScheduleElementsTogether(
- const std::vector<LayerAnimationElement*>& element);
-
// Returns true if there is an animation in the queue (animations remain in
// the queue until they complete).
bool is_animating() const { return !animation_queue_.empty(); }
@@ -112,30 +101,10 @@
}
base::TimeTicks get_last_step_time_for_test() { return last_step_time_; }
- // Scoped settings allow you to temporarily change the animator's settings and
- // these changes are reverted when the object is destroyed. NOTE: when the
- // settings object is created, it applies the default transition duration
- // (200ms).
- class ScopedSettings {
- public:
- explicit ScopedSettings(LayerAnimator* animator);
- virtual ~ScopedSettings();
-
- void SetTransitionDuration(base::TimeDelta duration);
-
- private:
- LayerAnimator* animator_;
- base::TimeDelta old_transition_duration_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedSettings);
- };
-
protected:
- LayerAnimatorDelegate* delegate() { return delegate_; }
+ LayerAnimationDelegate* delegate() { return delegate_; }
private:
- friend class TransientSettings;
-
// We need to keep track of the start time of every running animation.
struct RunningAnimation {
RunningAnimation(LayerAnimationSequence* sequence,
@@ -207,15 +176,11 @@
// properties affected by |sequence|.
bool StartSequenceImmediately(LayerAnimationSequence* sequence);
- // Sets the value of target as if all the running and queued animations were
- // allowed to finish.
- void GetTargetValue(LayerAnimationElement::TargetValue* target) const;
-
// This is the queue of animations to run.
AnimationQueue animation_queue_;
// The target of all layer animations.
- LayerAnimatorDelegate* delegate_;
+ LayerAnimationDelegate* delegate_;
// The currently running animations.
RunningAnimations running_animations_;
« no previous file with comments | « ui/gfx/compositor/layer_animation_sequence_unittest.cc ('k') | ui/gfx/compositor/layer_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698