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

Side by Side Diff: cc/animation/keyframed_animation_curve.cc

Issue 12822004: Part 3 of cc/ directory shuffles: animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "cc/keyframed_animation_curve.h" 5 #include "cc/animation/keyframed_animation_curve.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 namespace { 9 namespace {
10 10
11 template <class Keyframe> 11 template <class Keyframe>
12 void InsertKeyframe(scoped_ptr<Keyframe> keyframe, 12 void InsertKeyframe(scoped_ptr<Keyframe> keyframe,
13 ScopedPtrVector<Keyframe>& keyframes) { 13 ScopedPtrVector<Keyframe>& keyframes) {
14 // Usually, the keyframes will be added in order, so this loop would be 14 // Usually, the keyframes will be added in order, so this loop would be
15 // unnecessary and we should skip it if possible. 15 // unnecessary and we should skip it if possible.
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 double progress = (t - keyframes_[i]->Time()) / 191 double progress = (t - keyframes_[i]->Time()) /
192 (keyframes_[i+1]->Time() - keyframes_[i]->Time()); 192 (keyframes_[i+1]->Time() - keyframes_[i]->Time());
193 193
194 if (keyframes_[i]->timing_function()) 194 if (keyframes_[i]->timing_function())
195 progress = keyframes_[i]->timing_function()->GetValue(progress); 195 progress = keyframes_[i]->timing_function()->GetValue(progress);
196 196
197 return keyframes_[i+1]->Value().Blend(keyframes_[i]->Value(), progress); 197 return keyframes_[i+1]->Value().Blend(keyframes_[i]->Value(), progress);
198 } 198 }
199 199
200 } // namespace cc 200 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/keyframed_animation_curve.h ('k') | cc/animation/keyframed_animation_curve_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698