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

Unified Diff: cc/animation/keyframed_animation_curve.h

Issue 598853003: CC: Add curve (whole animation) timing function to compositor animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 3 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 | « no previous file | cc/animation/keyframed_animation_curve.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/keyframed_animation_curve.h
diff --git a/cc/animation/keyframed_animation_curve.h b/cc/animation/keyframed_animation_curve.h
index ded48c6721ff28e76886295c00b4163421994559..2fb1888ef6e2c06d5f7b19e400aca11ae22ab951 100644
--- a/cc/animation/keyframed_animation_curve.h
+++ b/cc/animation/keyframed_animation_curve.h
@@ -121,6 +121,9 @@ class CC_EXPORT KeyframedColorAnimationCurve : public ColorAnimationCurve {
virtual ~KeyframedColorAnimationCurve();
void AddKeyframe(scoped_ptr<ColorKeyframe> keyframe);
+ void SetTimingFunction(scoped_ptr<TimingFunction> timing_function) {
+ timing_function_ = timing_function.Pass();
+ }
// AnimationCurve implementation
virtual double Duration() const OVERRIDE;
@@ -135,6 +138,7 @@ class CC_EXPORT KeyframedColorAnimationCurve : public ColorAnimationCurve {
// Always sorted in order of increasing time. No two keyframes have the
// same time.
ScopedPtrVector<ColorKeyframe> keyframes_;
+ scoped_ptr<TimingFunction> timing_function_;
DISALLOW_COPY_AND_ASSIGN(KeyframedColorAnimationCurve);
};
@@ -147,6 +151,9 @@ class CC_EXPORT KeyframedFloatAnimationCurve : public FloatAnimationCurve {
virtual ~KeyframedFloatAnimationCurve();
void AddKeyframe(scoped_ptr<FloatKeyframe> keyframe);
+ void SetTimingFunction(scoped_ptr<TimingFunction> timing_function) {
+ timing_function_ = timing_function.Pass();
+ }
// AnimationCurve implementation
virtual double Duration() const OVERRIDE;
@@ -161,6 +168,7 @@ class CC_EXPORT KeyframedFloatAnimationCurve : public FloatAnimationCurve {
// Always sorted in order of increasing time. No two keyframes have the
// same time.
ScopedPtrVector<FloatKeyframe> keyframes_;
+ scoped_ptr<TimingFunction> timing_function_;
DISALLOW_COPY_AND_ASSIGN(KeyframedFloatAnimationCurve);
};
@@ -174,6 +182,9 @@ class CC_EXPORT KeyframedTransformAnimationCurve
virtual ~KeyframedTransformAnimationCurve();
void AddKeyframe(scoped_ptr<TransformKeyframe> keyframe);
+ void SetTimingFunction(scoped_ptr<TimingFunction> timing_function) {
+ timing_function_ = timing_function.Pass();
+ }
// AnimationCurve implementation
virtual double Duration() const OVERRIDE;
@@ -193,6 +204,7 @@ class CC_EXPORT KeyframedTransformAnimationCurve
// Always sorted in order of increasing time. No two keyframes have the
// same time.
ScopedPtrVector<TransformKeyframe> keyframes_;
+ scoped_ptr<TimingFunction> timing_function_;
DISALLOW_COPY_AND_ASSIGN(KeyframedTransformAnimationCurve);
};
@@ -206,6 +218,9 @@ class CC_EXPORT KeyframedFilterAnimationCurve
virtual ~KeyframedFilterAnimationCurve();
void AddKeyframe(scoped_ptr<FilterKeyframe> keyframe);
+ void SetTimingFunction(scoped_ptr<TimingFunction> timing_function) {
+ timing_function_ = timing_function.Pass();
+ }
// AnimationCurve implementation
virtual double Duration() const OVERRIDE;
@@ -221,6 +236,7 @@ class CC_EXPORT KeyframedFilterAnimationCurve
// Always sorted in order of increasing time. No two keyframes have the
// same time.
ScopedPtrVector<FilterKeyframe> keyframes_;
+ scoped_ptr<TimingFunction> timing_function_;
DISALLOW_COPY_AND_ASSIGN(KeyframedFilterAnimationCurve);
};
« no previous file with comments | « no previous file | cc/animation/keyframed_animation_curve.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698