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

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

Issue 1229273004: Remove Animations and Transitions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "sky/engine/core/animation/InterpolationEffect.h"
6
7 namespace blink {
8
9 PassOwnPtr<Vector<RefPtr<Interpolation> > > InterpolationEffect::getActiveInterp olations(double fraction, double iterationDuration) const
10 {
11
12 Vector<RefPtr<Interpolation> >* result = new Vector<RefPtr<Interpolation> >( );
13
14 for (size_t i = 0; i < m_interpolations.size(); ++i) {
15 const InterpolationRecord* record = m_interpolations[i].get();
16 if (fraction >= record->m_applyFrom && fraction < record->m_applyTo) {
17 RefPtr<Interpolation> interpolation = record->m_interpolation;
18 double localFraction = (fraction - record->m_start) / (record->m_end - record->m_start);
19 if (record->m_easing)
20 localFraction = record->m_easing->evaluate(localFraction, accura cyForDuration(iterationDuration));
21 interpolation->interpolate(0, localFraction);
22 result->append(interpolation);
23 }
24 }
25
26 return adoptPtr(result);
27 }
28
29 }
OLDNEW
« no previous file with comments | « sky/engine/core/animation/InterpolationEffect.h ('k') | sky/engine/core/animation/InterpolationEffectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698