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

Unified Diff: cc/animation/animation_curve.cc

Issue 2966723003: Add support for bounds animations (Closed)
Patch Set: Added another unit test to confirm that extrapolation won't lead to invalid sizes. 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
Index: cc/animation/animation_curve.cc
diff --git a/cc/animation/animation_curve.cc b/cc/animation/animation_curve.cc
index 9e8cae93538d0c32d89bade13d50165895b7a26d..b7c5891f7e436f29c75fa74e7b2803ef2b0e24a3 100644
--- a/cc/animation/animation_curve.cc
+++ b/cc/animation/animation_curve.cc
@@ -57,4 +57,13 @@ ScrollOffsetAnimationCurve* AnimationCurve::ToScrollOffsetAnimationCurve() {
return static_cast<ScrollOffsetAnimationCurve*>(this);
}
+const SizeAnimationCurve* AnimationCurve::ToSizeAnimationCurve() const {
+ DCHECK(Type() == AnimationCurve::SIZE);
+ return static_cast<const SizeAnimationCurve*>(this);
+}
+
+AnimationCurve::CurveType SizeAnimationCurve::Type() const {
+ return SIZE;
+}
+
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698