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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 void Animation::applyEffects() | 130 void Animation::applyEffects() |
131 { | 131 { |
132 ASSERT(isInEffect()); | 132 ASSERT(isInEffect()); |
133 ASSERT(player()); | 133 ASSERT(player()); |
134 if (!m_target || !m_effect) | 134 if (!m_target || !m_effect) |
135 return; | 135 return; |
136 | 136 |
137 double iteration = currentIteration(); | 137 double iteration = currentIteration(); |
138 ASSERT(iteration >= 0); | 138 ASSERT(iteration >= 0); |
139 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > in
terpolations = m_sampledEffect ? m_sampledEffect->mutableInterpolations() : null
ptr; | 139 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> inte
rpolations = m_sampledEffect ? m_sampledEffect->mutableInterpolations() : nullpt
r; |
140 // FIXME: Handle iteration values which overflow int. | 140 // FIXME: Handle iteration values which overflow int. |
141 m_effect->sample(static_cast<int>(iteration), timeFraction(), iterationDurat
ion(), interpolations); | 141 m_effect->sample(static_cast<int>(iteration), timeFraction(), iterationDurat
ion(), interpolations); |
142 if (m_sampledEffect) { | 142 if (m_sampledEffect) { |
143 m_sampledEffect->setInterpolations(interpolations.release()); | 143 m_sampledEffect->setInterpolations(interpolations.release()); |
144 } else if (interpolations && !interpolations->isEmpty()) { | 144 } else if (interpolations && !interpolations->isEmpty()) { |
145 OwnPtrWillBeRawPtr<SampledEffect> sampledEffect = SampledEffect::create(
this, interpolations.release()); | 145 OwnPtrWillBeRawPtr<SampledEffect> sampledEffect = SampledEffect::create(
this, interpolations.release()); |
146 m_sampledEffect = sampledEffect.get(); | 146 m_sampledEffect = sampledEffect.get(); |
147 ensureAnimationStack(m_target).add(sampledEffect.release()); | 147 ensureAnimationStack(m_target).add(sampledEffect.release()); |
148 } else { | 148 } else { |
149 return; | 149 return; |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 | 303 |
304 DEFINE_TRACE(Animation) | 304 DEFINE_TRACE(Animation) |
305 { | 305 { |
306 visitor->trace(m_target); | 306 visitor->trace(m_target); |
307 visitor->trace(m_effect); | 307 visitor->trace(m_effect); |
308 visitor->trace(m_sampledEffect); | 308 visitor->trace(m_sampledEffect); |
309 AnimationNode::trace(visitor); | 309 AnimationNode::trace(visitor); |
310 } | 310 } |
311 | 311 |
312 } // namespace blink | 312 } // namespace blink |
OLD | NEW |