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

Side by Side Diff: sky/engine/core/animation/InterpolableValue.cpp

Issue 723253004: Remove tons of OILPAN. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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); 10 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(InterpolableValue);
(...skipping 30 matching lines...) Expand all
41 41
42 OwnPtr<InterpolableList> result = create(m_size); 42 OwnPtr<InterpolableList> result = create(m_size);
43 for (size_t i = 0; i < m_size; i++) { 43 for (size_t i = 0; i < m_size; i++) {
44 ASSERT(m_values[i]); 44 ASSERT(m_values[i]);
45 ASSERT(toList.m_values[i]); 45 ASSERT(toList.m_values[i]);
46 result->set(i, m_values[i]->interpolate(*(toList.m_values[i]), progress) ); 46 result->set(i, m_values[i]->interpolate(*(toList.m_values[i]), progress) );
47 } 47 }
48 return result.release(); 48 return result.release();
49 } 49 }
50 50
51 void InterpolableList::trace(Visitor* visitor)
52 {
53 #if ENABLE_OILPAN
54 visitor->trace(m_values);
55 #endif
56 InterpolableValue::trace(visitor);
57 }
58
59 PassOwnPtr<InterpolableValue> InterpolableAnimatableValue::interpolate(const Int erpolableValue &other, const double percentage) const 51 PassOwnPtr<InterpolableValue> InterpolableAnimatableValue::interpolate(const Int erpolableValue &other, const double percentage) const
60 { 52 {
61 const InterpolableAnimatableValue& otherValue = toInterpolableAnimatableValu e(other); 53 const InterpolableAnimatableValue& otherValue = toInterpolableAnimatableValu e(other);
62 if (!percentage) 54 if (!percentage)
63 return create(m_value); 55 return create(m_value);
64 if (percentage == 1) 56 if (percentage == 1)
65 return create(otherValue.m_value); 57 return create(otherValue.m_value);
66 return create(AnimatableValue::interpolate(m_value.get(), otherValue.m_value .get(), percentage)); 58 return create(AnimatableValue::interpolate(m_value.get(), otherValue.m_value .get(), percentage));
67 } 59 }
68 60
69 void InterpolableAnimatableValue::trace(Visitor* visitor)
70 {
71 visitor->trace(m_value);
72 InterpolableValue::trace(visitor);
73 } 61 }
74
75 }
OLDNEW
« no previous file with comments | « sky/engine/core/animation/InterpolableValue.h ('k') | sky/engine/core/animation/Interpolation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698