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

Unified Diff: cc/animation/animation_curve.h

Issue 2966723003: Add support for bounds animations (Closed)
Patch Set: address reviewer feedback Created 3 years, 5 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/animation_curve.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/animation_curve.h
diff --git a/cc/animation/animation_curve.h b/cc/animation/animation_curve.h
index 72b8e6309148ccfaf5390d408ee1905dbc56b769..3b715048310bef25b5093d9874ef1caf9457f6ad 100644
--- a/cc/animation/animation_curve.h
+++ b/cc/animation/animation_curve.h
@@ -10,6 +10,7 @@
#include "base/time/time.h"
#include "cc/animation/animation_export.h"
#include "cc/base/filter_operations.h"
+#include "ui/gfx/geometry/size_f.h"
#include "ui/gfx/transform.h"
namespace gfx {
@@ -22,12 +23,13 @@ class ColorAnimationCurve;
class FilterAnimationCurve;
class FloatAnimationCurve;
class ScrollOffsetAnimationCurve;
+class SizeAnimationCurve;
class TransformAnimationCurve;
// An animation curve is a function that returns a value given a time.
class CC_ANIMATION_EXPORT AnimationCurve {
public:
- enum CurveType { COLOR, FLOAT, TRANSFORM, FILTER, SCROLL_OFFSET };
+ enum CurveType { COLOR, FLOAT, TRANSFORM, FILTER, SCROLL_OFFSET, SIZE };
virtual ~AnimationCurve() {}
@@ -40,6 +42,7 @@ class CC_ANIMATION_EXPORT AnimationCurve {
const TransformAnimationCurve* ToTransformAnimationCurve() const;
const FilterAnimationCurve* ToFilterAnimationCurve() const;
const ScrollOffsetAnimationCurve* ToScrollOffsetAnimationCurve() const;
+ const SizeAnimationCurve* ToSizeAnimationCurve() const;
ScrollOffsetAnimationCurve* ToScrollOffsetAnimationCurve();
};
@@ -109,6 +112,16 @@ class CC_ANIMATION_EXPORT FilterAnimationCurve : public AnimationCurve {
CurveType Type() const override;
};
+class CC_ANIMATION_EXPORT SizeAnimationCurve : public AnimationCurve {
+ public:
+ ~SizeAnimationCurve() override {}
+
+ virtual gfx::SizeF GetValue(base::TimeDelta t) const = 0;
+
+ // Partial Animation implementation.
+ CurveType Type() const override;
+};
+
} // namespace cc
#endif // CC_ANIMATION_ANIMATION_CURVE_H_
« no previous file with comments | « no previous file | cc/animation/animation_curve.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698