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

Side by Side Diff: cc/CCKeyframedAnimationCurve.cpp

Issue 11048044: cc: Switch to Chromium DCHECKs and LOGs (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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 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 "config.h" 5 #include "config.h"
6 6
7 #include "CCKeyframedAnimationCurve.h" 7 #include "CCKeyframedAnimationCurve.h"
8 8
9 #include <wtf/OwnPtr.h> 9 #include <wtf/OwnPtr.h>
10 10
(...skipping 17 matching lines...) Expand all
28 return; 28 return;
29 } 29 }
30 } 30 }
31 } 31 }
32 32
33 keyframes.append(keyframe.release()); 33 keyframes.append(keyframe.release());
34 } 34 }
35 35
36 PassOwnPtr<CCTimingFunction> cloneTimingFunction(const CCTimingFunction* timingF unction) 36 PassOwnPtr<CCTimingFunction> cloneTimingFunction(const CCTimingFunction* timingF unction)
37 { 37 {
38 ASSERT(timingFunction); 38 DCHECK(timingFunction);
39 OwnPtr<CCAnimationCurve> curve(timingFunction->clone()); 39 OwnPtr<CCAnimationCurve> curve(timingFunction->clone());
40 return adoptPtr(static_cast<CCTimingFunction*>(curve.leakPtr())); 40 return adoptPtr(static_cast<CCTimingFunction*>(curve.leakPtr()));
41 } 41 }
42 42
43 } // namespace 43 } // namespace
44 44
45 CCKeyframe::CCKeyframe(double time, PassOwnPtr<CCTimingFunction> timingFunction) 45 CCKeyframe::CCKeyframe(double time, PassOwnPtr<CCTimingFunction> timingFunction)
46 : m_time(time) 46 : m_time(time)
47 , m_timingFunction(timingFunction) 47 , m_timingFunction(timingFunction)
48 { 48 {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 double progress = (t - m_keyframes[i]->time()) / (m_keyframes[i+1]->time() - m_keyframes[i]->time()); 213 double progress = (t - m_keyframes[i]->time()) / (m_keyframes[i+1]->time() - m_keyframes[i]->time());
214 214
215 if (m_keyframes[i]->timingFunction()) 215 if (m_keyframes[i]->timingFunction())
216 progress = m_keyframes[i]->timingFunction()->getValue(progress); 216 progress = m_keyframes[i]->timingFunction()->getValue(progress);
217 217
218 return m_keyframes[i+1]->value().blend(m_keyframes[i]->value(), progress); 218 return m_keyframes[i+1]->value().blend(m_keyframes[i]->value(), progress);
219 } 219 }
220 220
221 } // namespace cc 221 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698