OLD | NEW |
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 namespace { | 10 namespace { |
(...skipping 16 matching lines...) Expand all Loading... |
27 return false; | 27 return false; |
28 for (size_t i = 0; i < startList->length(); ++i) { | 28 for (size_t i = 0; i < startList->length(); ++i) { |
29 if (!typesMatch(startList->get(i), endList->get(i))) | 29 if (!typesMatch(startList->get(i), endList->get(i))) |
30 return false; | 30 return false; |
31 } | 31 } |
32 return true; | 32 return true; |
33 } | 33 } |
34 | 34 |
35 } | 35 } |
36 | 36 |
37 Interpolation::Interpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, Pa
ssOwnPtrWillBeRawPtr<InterpolableValue> end) | 37 Interpolation::Interpolation(InterpolableValue* start, InterpolableValue* end) |
38 : m_start(start) | 38 : m_start(start) |
39 , m_end(end) | 39 , m_end(end) |
40 , m_cachedFraction(0) | 40 , m_cachedFraction(0) |
41 , m_cachedIteration(0) | 41 , m_cachedIteration(0) |
42 , m_cachedValue(m_start ? m_start->clone() : nullptr) | 42 , m_cachedValue(m_start ? m_start->clone() : nullptr) |
43 { | 43 { |
44 RELEASE_ASSERT(typesMatch(m_start.get(), m_end.get())); | 44 RELEASE_ASSERT(typesMatch(m_start.get(), m_end.get())); |
45 } | 45 } |
46 | 46 |
47 Interpolation::~Interpolation() | 47 Interpolation::~Interpolation() |
(...skipping 10 matching lines...) Expand all Loading... |
58 } | 58 } |
59 | 59 |
60 DEFINE_TRACE(Interpolation) | 60 DEFINE_TRACE(Interpolation) |
61 { | 61 { |
62 visitor->trace(m_start); | 62 visitor->trace(m_start); |
63 visitor->trace(m_end); | 63 visitor->trace(m_end); |
64 visitor->trace(m_cachedValue); | 64 visitor->trace(m_cachedValue); |
65 } | 65 } |
66 | 66 |
67 } | 67 } |
OLD | NEW |