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

Side by Side Diff: Source/core/animation/Interpolation.cpp

Issue 901633002: Oilpan: fix build after r189490 (a22afce3). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 | « Source/core/animation/Interpolation.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "config.h" 5 #include "config.h"
6 #include "core/animation/Interpolation.h" 6 #include "core/animation/Interpolation.h"
7 7
8 namespace blink { 8 namespace blink {
9 9
10 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(Interpolation);
11
12 namespace { 10 namespace {
13 11
14 bool typesMatch(const InterpolableValue* start, const InterpolableValue* end) 12 bool typesMatch(const InterpolableValue* start, const InterpolableValue* end)
15 { 13 {
16 if (start->isNumber()) 14 if (start->isNumber())
17 return end->isNumber(); 15 return end->isNumber();
18 if (start->isBool()) 16 if (start->isBool())
19 return end->isBool(); 17 return end->isBool();
20 if (start->isAnimatableValue()) 18 if (start->isAnimatableValue())
21 return end->isAnimatableValue(); 19 return end->isAnimatableValue();
(...skipping 15 matching lines...) Expand all
37 Interpolation::Interpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, Pa ssOwnPtrWillBeRawPtr<InterpolableValue> end) 35 Interpolation::Interpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, Pa ssOwnPtrWillBeRawPtr<InterpolableValue> end)
38 : m_start(start) 36 : m_start(start)
39 , m_end(end) 37 , m_end(end)
40 , m_cachedFraction(0) 38 , m_cachedFraction(0)
41 , m_cachedIteration(0) 39 , m_cachedIteration(0)
42 , m_cachedValue(m_start->clone()) 40 , m_cachedValue(m_start->clone())
43 { 41 {
44 RELEASE_ASSERT(typesMatch(m_start.get(), m_end.get())); 42 RELEASE_ASSERT(typesMatch(m_start.get(), m_end.get()));
45 } 43 }
46 44
45 Interpolation::~Interpolation()
46 {
47 }
48
47 void Interpolation::interpolate(int iteration, double fraction) const 49 void Interpolation::interpolate(int iteration, double fraction) const
48 { 50 {
49 if (m_cachedFraction != fraction || m_cachedIteration != iteration) { 51 if (m_cachedFraction != fraction || m_cachedIteration != iteration) {
50 m_start->interpolate(*m_end, fraction, *m_cachedValue); 52 m_start->interpolate(*m_end, fraction, *m_cachedValue);
51 m_cachedIteration = iteration; 53 m_cachedIteration = iteration;
52 m_cachedFraction = fraction; 54 m_cachedFraction = fraction;
53 } 55 }
54 } 56 }
55 57
56 void Interpolation::trace(Visitor* visitor) 58 void Interpolation::trace(Visitor* visitor)
57 { 59 {
58 visitor->trace(m_start); 60 visitor->trace(m_start);
59 visitor->trace(m_end); 61 visitor->trace(m_end);
60 visitor->trace(m_cachedValue); 62 visitor->trace(m_cachedValue);
61 } 63 }
62 64
63 } 65 }
OLDNEW
« no previous file with comments | « Source/core/animation/Interpolation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698