OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 result = m_keyframes[0]->properties(); | 110 result = m_keyframes[0]->properties(); |
111 for (size_t i = 1; i < m_keyframes.size(); i++) { | 111 for (size_t i = 1; i < m_keyframes.size(); i++) { |
112 PropertySet extras = m_keyframes[i]->properties(); | 112 PropertySet extras = m_keyframes[i]->properties(); |
113 for (PropertySet::const_iterator it = extras.begin(); it != extras.end()
; ++it) { | 113 for (PropertySet::const_iterator it = extras.begin(); it != extras.end()
; ++it) { |
114 result.add(*it); | 114 result.add(*it); |
115 } | 115 } |
116 } | 116 } |
117 return result; | 117 return result; |
118 } | 118 } |
119 | 119 |
120 PassOwnPtr<Vector<RefPtr<Interpolation> > > KeyframeEffectModel::sample(int iter
ation, double fraction) const | 120 PassOwnPtr<Vector<RefPtr<Interpolation> > > KeyframeEffectModel::sample(int iter
ation, double fraction, double iterationDuration) const |
121 { | 121 { |
122 ASSERT(iteration >= 0); | 122 ASSERT(iteration >= 0); |
123 ASSERT(!isNull(fraction)); | 123 ASSERT(!isNull(fraction)); |
124 ensureKeyframeGroups(); | 124 ensureKeyframeGroups(); |
125 ensureInterpolationEffect(); | 125 ensureInterpolationEffect(); |
126 | 126 |
127 return m_interpolationEffect->getActiveInterpolations(fraction); | 127 return m_interpolationEffect->getActiveInterpolations(fraction, iterationDur
ation); |
128 } | 128 } |
129 | 129 |
130 KeyframeEffectModel::KeyframeVector KeyframeEffectModel::normalizedKeyframes(con
st KeyframeVector& keyframes) | 130 KeyframeEffectModel::KeyframeVector KeyframeEffectModel::normalizedKeyframes(con
st KeyframeVector& keyframes) |
131 { | 131 { |
132 // keyframes [beginIndex, endIndex) will remain after removing all keyframes
if they are not | 132 // keyframes [beginIndex, endIndex) will remain after removing all keyframes
if they are not |
133 // loosely sorted by offset, and after removing keyframes with positional of
fset outide [0, 1]. | 133 // loosely sorted by offset, and after removing keyframes with positional of
fset outide [0, 1]. |
134 size_t beginIndex = 0; | 134 size_t beginIndex = 0; |
135 size_t endIndex = keyframes.size(); | 135 size_t endIndex = keyframes.size(); |
136 | 136 |
137 // Becomes the most recent keyframe with an explicit offset. | 137 // Becomes the most recent keyframe with an explicit offset. |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 } | 334 } |
335 | 335 |
336 void KeyframeEffectModel::PropertySpecificKeyframeGroup::trace(Visitor* visitor) | 336 void KeyframeEffectModel::PropertySpecificKeyframeGroup::trace(Visitor* visitor) |
337 { | 337 { |
338 #if ENABLE_OILPAN | 338 #if ENABLE_OILPAN |
339 visitor->trace(m_keyframes); | 339 visitor->trace(m_keyframes); |
340 #endif | 340 #endif |
341 } | 341 } |
342 | 342 |
343 } // namespace | 343 } // namespace |
OLD | NEW |