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

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

Issue 1120003002: [Oilpan] Migrate most classes under core/animations to Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 4 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
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/InterpolableValue.h" 6 #include "core/animation/InterpolableValue.h"
7 7
8 namespace blink { 8 namespace blink {
9 9
10 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(InterpolableValue);
11
12 void InterpolableNumber::interpolate(const InterpolableValue &to, const double p rogress, InterpolableValue& result) const 10 void InterpolableNumber::interpolate(const InterpolableValue &to, const double p rogress, InterpolableValue& result) const
13 { 11 {
14 const InterpolableNumber& toNumber = toInterpolableNumber(to); 12 const InterpolableNumber& toNumber = toInterpolableNumber(to);
15 InterpolableNumber& resultNumber = toInterpolableNumber(result); 13 InterpolableNumber& resultNumber = toInterpolableNumber(result);
16 14
17 if (progress == 0 || m_value == toNumber.m_value) 15 if (progress == 0 || m_value == toNumber.m_value)
18 resultNumber.m_value = m_value; 16 resultNumber.m_value = m_value;
19 else if (progress == 1) 17 else if (progress == 1)
20 resultNumber.m_value = toNumber.m_value; 18 resultNumber.m_value = toNumber.m_value;
21 else 19 else
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 resultValue.m_value = AnimatableValue::interpolate(m_value.get(), toValue.m_ value.get(), progress); 76 resultValue.m_value = AnimatableValue::interpolate(m_value.get(), toValue.m_ value.get(), progress);
79 } 77 }
80 78
81 DEFINE_TRACE(InterpolableAnimatableValue) 79 DEFINE_TRACE(InterpolableAnimatableValue)
82 { 80 {
83 visitor->trace(m_value); 81 visitor->trace(m_value);
84 InterpolableValue::trace(visitor); 82 InterpolableValue::trace(visitor);
85 } 83 }
86 84
87 } 85 }
OLDNEW
« no previous file with comments | « Source/core/animation/InterpolableValue.h ('k') | Source/core/animation/InterpolableValueTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698