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

Side by Side Diff: cc/animation_curve.cc

Issue 12517003: cc: Chromify the Animation and LayerAnimationController classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/animation_curve.h" 5 #include "cc/animation_curve.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
11 const FloatAnimationCurve* AnimationCurve::toFloatAnimationCurve() const 11 const FloatAnimationCurve* AnimationCurve::ToFloatAnimationCurve() const {
12 { 12 DCHECK(Type() == AnimationCurve::Float);
13 DCHECK(type() == AnimationCurve::Float); 13 return static_cast<const FloatAnimationCurve*>(this);
14 return static_cast<const FloatAnimationCurve*>(this);
15 } 14 }
16 15
17 AnimationCurve::Type FloatAnimationCurve::type() const 16 AnimationCurve::CurveType FloatAnimationCurve::Type() const {
18 { 17 return Float;
19 return Float;
20 } 18 }
21 19
22 const TransformAnimationCurve* AnimationCurve::toTransformAnimationCurve() const 20 const TransformAnimationCurve* AnimationCurve::ToTransformAnimationCurve()
23 { 21 const {
24 DCHECK(type() == AnimationCurve::Transform); 22 DCHECK(Type() == AnimationCurve::Transform);
25 return static_cast<const TransformAnimationCurve*>(this); 23 return static_cast<const TransformAnimationCurve*>(this);
26 } 24 }
27 25
28 AnimationCurve::Type TransformAnimationCurve::type() const 26 AnimationCurve::CurveType TransformAnimationCurve::Type() const {
29 { 27 return Transform;
30 return Transform;
31 } 28 }
32 29
33 } // namespace cc 30 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698