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

Side by Side Diff: sky/engine/core/animation/InterpolationEffect.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
« no previous file with comments | « sky/engine/core/animation/InterpolationEffect.h ('k') | sky/engine/core/animation/Keyframe.h » ('j') | 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/InterpolationEffect.h" 6 #include "core/animation/InterpolationEffect.h"
7 7
8 namespace blink { 8 namespace blink {
9 9
10 PassOwnPtr<Vector<RefPtr<Interpolation> > > InterpolationEffect::getActiveInterp olations(double fraction, double iterationDuration) const 10 PassOwnPtr<Vector<RefPtr<Interpolation> > > InterpolationEffect::getActiveInterp olations(double fraction, double iterationDuration) const
11 { 11 {
12 12
13 Vector<RefPtr<Interpolation> >* result = new Vector<RefPtr<Interpolation> >( ); 13 Vector<RefPtr<Interpolation> >* result = new Vector<RefPtr<Interpolation> >( );
14 14
15 for (size_t i = 0; i < m_interpolations.size(); ++i) { 15 for (size_t i = 0; i < m_interpolations.size(); ++i) {
16 const InterpolationRecord* record = m_interpolations[i].get(); 16 const InterpolationRecord* record = m_interpolations[i].get();
17 if (fraction >= record->m_applyFrom && fraction < record->m_applyTo) { 17 if (fraction >= record->m_applyFrom && fraction < record->m_applyTo) {
18 RefPtr<Interpolation> interpolation = record->m_interpolation; 18 RefPtr<Interpolation> interpolation = record->m_interpolation;
19 double localFraction = (fraction - record->m_start) / (record->m_end - record->m_start); 19 double localFraction = (fraction - record->m_start) / (record->m_end - record->m_start);
20 if (record->m_easing) 20 if (record->m_easing)
21 localFraction = record->m_easing->evaluate(localFraction, accura cyForDuration(iterationDuration)); 21 localFraction = record->m_easing->evaluate(localFraction, accura cyForDuration(iterationDuration));
22 interpolation->interpolate(0, localFraction); 22 interpolation->interpolate(0, localFraction);
23 result->append(interpolation); 23 result->append(interpolation);
24 } 24 }
25 } 25 }
26 26
27 return adoptPtr(result); 27 return adoptPtr(result);
28 } 28 }
29 29
30 void InterpolationEffect::InterpolationRecord::trace(Visitor* visitor)
31 {
32 visitor->trace(m_interpolation);
33 } 30 }
34
35 void InterpolationEffect::trace(Visitor* visitor)
36 {
37 #if ENABLE_OILPAN
38 visitor->trace(m_interpolations);
39 #endif
40 }
41
42 }
OLDNEW
« no previous file with comments | « sky/engine/core/animation/InterpolationEffect.h ('k') | sky/engine/core/animation/Keyframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698