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

Side by Side Diff: sky/engine/core/animation/Interpolation.h

Issue 1229273004: Remove Animations and Transitions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SKY_ENGINE_CORE_ANIMATION_INTERPOLATION_H_
6 #define SKY_ENGINE_CORE_ANIMATION_INTERPOLATION_H_
7
8 #include "sky/engine/core/animation/InterpolableValue.h"
9 #include "sky/engine/platform/heap/Handle.h"
10
11 namespace blink {
12
13 class Interpolation : public RefCounted<Interpolation> {
14 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(Interpolation);
15 public:
16 static PassRefPtr<Interpolation> create(PassOwnPtr<InterpolableValue> start, PassOwnPtr<InterpolableValue> end)
17 {
18 return adoptRef(new Interpolation(start, end));
19 }
20
21 void interpolate(int iteration, double fraction) const;
22
23 virtual bool isStyleInterpolation() const { return false; }
24 virtual bool isLegacyStyleInterpolation() const { return false; }
25
26 protected:
27 const OwnPtr<InterpolableValue> m_start;
28 const OwnPtr<InterpolableValue> m_end;
29
30 mutable double m_cachedFraction;
31 mutable int m_cachedIteration;
32 mutable OwnPtr<InterpolableValue> m_cachedValue;
33
34 Interpolation(PassOwnPtr<InterpolableValue> start, PassOwnPtr<InterpolableVa lue> end);
35
36 private:
37 InterpolableValue* getCachedValueForTesting() const { return m_cachedValue.g et(); }
38
39 friend class AnimationInterpolableValueTest;
40 friend class AnimationInterpolationEffectTest;
41 };
42
43 }
44
45 #endif // SKY_ENGINE_CORE_ANIMATION_INTERPOLATION_H_
OLDNEW
« no previous file with comments | « sky/engine/core/animation/InterpolableValueTest.cpp ('k') | sky/engine/core/animation/Interpolation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698