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

Side by Side Diff: cc/animation/animation_curve.cc

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « cc/animation/animation_curve.h ('k') | cc/animation/animation_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "cc/animation/animation_curve.h"
6
7 #include "base/logging.h"
8 #include "cc/animation/scroll_offset_animation_curve.h"
9
10 namespace cc {
11
12 const ColorAnimationCurve* AnimationCurve::ToColorAnimationCurve() const {
13 DCHECK(Type() == AnimationCurve::COLOR);
14 return static_cast<const ColorAnimationCurve*>(this);
15 }
16
17 AnimationCurve::CurveType ColorAnimationCurve::Type() const {
18 return COLOR;
19 }
20
21 const FloatAnimationCurve* AnimationCurve::ToFloatAnimationCurve() const {
22 DCHECK(Type() == AnimationCurve::FLOAT);
23 return static_cast<const FloatAnimationCurve*>(this);
24 }
25
26 AnimationCurve::CurveType FloatAnimationCurve::Type() const {
27 return FLOAT;
28 }
29
30 const TransformAnimationCurve* AnimationCurve::ToTransformAnimationCurve()
31 const {
32 DCHECK(Type() == AnimationCurve::TRANSFORM);
33 return static_cast<const TransformAnimationCurve*>(this);
34 }
35
36 AnimationCurve::CurveType TransformAnimationCurve::Type() const {
37 return TRANSFORM;
38 }
39
40 const FilterAnimationCurve* AnimationCurve::ToFilterAnimationCurve() const {
41 DCHECK(Type() == AnimationCurve::FILTER);
42 return static_cast<const FilterAnimationCurve*>(this);
43 }
44
45 AnimationCurve::CurveType FilterAnimationCurve::Type() const {
46 return FILTER;
47 }
48
49 const ScrollOffsetAnimationCurve* AnimationCurve::ToScrollOffsetAnimationCurve()
50 const {
51 DCHECK(Type() == AnimationCurve::SCROLL_OFFSET);
52 return static_cast<const ScrollOffsetAnimationCurve*>(this);
53 }
54
55 ScrollOffsetAnimationCurve* AnimationCurve::ToScrollOffsetAnimationCurve() {
56 DCHECK(Type() == AnimationCurve::SCROLL_OFFSET);
57 return static_cast<ScrollOffsetAnimationCurve*>(this);
58 }
59
60 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/animation_curve.h ('k') | cc/animation/animation_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698