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

Side by Side Diff: Source/core/animation/InterpolableValue.h

Issue 273683005: Web Animations API: Deferred computation of interpolated values (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add missing test file Created 6 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef InterpolableValue_h 5 #ifndef InterpolableValue_h
6 #define InterpolableValue_h 6 #define InterpolableValue_h
7 7
8 #include "core/animation/AnimatableValue.h" 8 #include "core/animation/AnimatableValue.h"
9 #include "wtf/OwnPtr.h" 9 #include "wtf/OwnPtr.h"
10 #include "wtf/PassOwnPtr.h" 10 #include "wtf/PassOwnPtr.h"
(...skipping 10 matching lines...) Expand all
21 virtual bool isAnimatableValue() const { return false; } 21 virtual bool isAnimatableValue() const { return false; }
22 22
23 virtual PassOwnPtrWillBeRawPtr<InterpolableValue> clone() const = 0; 23 virtual PassOwnPtrWillBeRawPtr<InterpolableValue> clone() const = 0;
24 24
25 virtual void trace(Visitor*) { } 25 virtual void trace(Visitor*) { }
26 26
27 private: 27 private:
28 virtual PassOwnPtrWillBeRawPtr<InterpolableValue> interpolate(const Interpol ableValue &to, const double progress) const = 0; 28 virtual PassOwnPtrWillBeRawPtr<InterpolableValue> interpolate(const Interpol ableValue &to, const double progress) const = 0;
29 29
30 friend class Interpolation; 30 friend class Interpolation;
31 friend class LegacyStyleInterpolation;
31 32
32 // Keep interpolate private, but allow calls within the hierarchy without 33 // Keep interpolate private, but allow calls within the hierarchy without
33 // knowledge of type. 34 // knowledge of type.
34 friend class InterpolableNumber; 35 friend class InterpolableNumber;
35 friend class InterpolableBool; 36 friend class InterpolableBool;
36 friend class InterpolableList; 37 friend class InterpolableList;
37 }; 38 };
38 39
39 class InterpolableNumber : public InterpolableValue { 40 class InterpolableNumber : public InterpolableValue {
40 public: 41 public:
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 }; 158 };
158 159
159 DEFINE_TYPE_CASTS(InterpolableNumber, InterpolableValue, value, value->isNumber( ), value.isNumber()); 160 DEFINE_TYPE_CASTS(InterpolableNumber, InterpolableValue, value, value->isNumber( ), value.isNumber());
160 DEFINE_TYPE_CASTS(InterpolableBool, InterpolableValue, value, value->isBool(), v alue.isBool()); 161 DEFINE_TYPE_CASTS(InterpolableBool, InterpolableValue, value, value->isBool(), v alue.isBool());
161 DEFINE_TYPE_CASTS(InterpolableList, InterpolableValue, value, value->isList(), v alue.isList()); 162 DEFINE_TYPE_CASTS(InterpolableList, InterpolableValue, value, value->isList(), v alue.isList());
162 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, InterpolableValue, value, value-> isAnimatableValue(), value.isAnimatableValue()); 163 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, InterpolableValue, value, value-> isAnimatableValue(), value.isAnimatableValue());
163 164
164 } 165 }
165 166
166 #endif 167 #endif
OLDNEW
« no previous file with comments | « Source/core/animation/CompositorAnimations.cpp ('k') | Source/core/animation/InterpolableValuePromiseTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698