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

Unified Diff: cc/animation/animation_curve.h

Issue 2966793002: NOT FOR REVIEW - convert to cc animation
Patch Set: switch to transform operations Created 3 years, 6 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 | « cc/animation/BUILD.gn ('k') | 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..3c06664c48272b73bcf306a81550e7b5d36237c6 100644
--- a/cc/animation/animation_curve.h
+++ b/cc/animation/animation_curve.h
@@ -10,7 +10,7 @@
#include "base/time/time.h"
#include "cc/animation/animation_export.h"
#include "cc/base/filter_operations.h"
-#include "ui/gfx/transform.h"
+#include "ui/gfx/geometry/size_f.h"
namespace gfx {
class BoxF;
@@ -22,12 +22,14 @@ class ColorAnimationCurve;
class FilterAnimationCurve;
class FloatAnimationCurve;
class ScrollOffsetAnimationCurve;
+class SizeAnimationCurve;
class TransformAnimationCurve;
+class TransformOperations;
// 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();
};
@@ -68,7 +71,7 @@ class CC_ANIMATION_EXPORT TransformAnimationCurve : public AnimationCurve {
public:
~TransformAnimationCurve() override {}
- virtual gfx::Transform GetValue(base::TimeDelta t) const = 0;
+ virtual TransformOperations GetValue(base::TimeDelta t) const = 0;
// Sets |bounds| to be the bounding box for the region within which |box|
// will move during this animation. If this region cannot be computed,
@@ -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 | « cc/animation/BUILD.gn ('k') | cc/animation/animation_curve.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698