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

Side by Side Diff: Source/core/animation/animatable/AnimatableDoubleAndBool.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, 3 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/animatable/AnimatableDoubleAndBool.h" 6 #include "core/animation/animatable/AnimatableDoubleAndBool.h"
7 7
8 #include "platform/animation/AnimationUtilities.h" 8 #include "platform/animation/AnimationUtilities.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 bool AnimatableDoubleAndBool::usesDefaultInterpolationWith(const AnimatableValue * value) const 12 bool AnimatableDoubleAndBool::usesDefaultInterpolationWith(const AnimatableValue * value) const
13 { 13 {
14 const AnimatableDoubleAndBool* other = toAnimatableDoubleAndBool(value); 14 const AnimatableDoubleAndBool* other = toAnimatableDoubleAndBool(value);
15 return flag() != other->flag(); 15 return flag() != other->flag();
16 } 16 }
17 17
18 PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableDoubleAndBool::interpolateTo(c onst AnimatableValue* value, double fraction) const 18 AnimatableValue* AnimatableDoubleAndBool::interpolateTo(const AnimatableValue* v alue, double fraction) const
19 { 19 {
20 const AnimatableDoubleAndBool* other = toAnimatableDoubleAndBool(value); 20 const AnimatableDoubleAndBool* other = toAnimatableDoubleAndBool(value);
21 if (flag() == other->flag()) 21 if (flag() == other->flag())
22 return AnimatableDoubleAndBool::create(blend(m_number, other->m_number, fraction), flag()); 22 return AnimatableDoubleAndBool::create(blend(m_number, other->m_number, fraction), flag());
23 23
24 return defaultInterpolateTo(this, value, fraction); 24 return defaultInterpolateTo(this, value, fraction);
25 } 25 }
26 26
27 bool AnimatableDoubleAndBool::equalTo(const AnimatableValue* value) const 27 bool AnimatableDoubleAndBool::equalTo(const AnimatableValue* value) const
28 { 28 {
29 const AnimatableDoubleAndBool* other = toAnimatableDoubleAndBool(value); 29 const AnimatableDoubleAndBool* other = toAnimatableDoubleAndBool(value);
30 return toDouble() == other->toDouble() && flag() == other->flag(); 30 return toDouble() == other->toDouble() && flag() == other->flag();
31 } 31 }
32 32
33 } 33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698