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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 return; | 116 return; |
117 | 117 |
118 if (player() && !previouslyInEffect) { | 118 if (player() && !previouslyInEffect) { |
119 ensureAnimationStack(m_target.get()).add(this); | 119 ensureAnimationStack(m_target.get()).add(this); |
120 m_activeInAnimationStack = true; | 120 m_activeInAnimationStack = true; |
121 } | 121 } |
122 | 122 |
123 double iteration = currentIteration(); | 123 double iteration = currentIteration(); |
124 ASSERT(iteration >= 0); | 124 ASSERT(iteration >= 0); |
125 // FIXME: Handle iteration values which overflow int. | 125 // FIXME: Handle iteration values which overflow int. |
126 m_activeInterpolations = m_effect->sample(static_cast<int>(iteration), timeF
raction()); | 126 m_activeInterpolations = m_effect->sample(static_cast<int>(iteration), timeF
raction(), duration()); |
127 if (player()) | 127 if (player()) |
128 m_target->setNeedsAnimationStyleRecalc(); | 128 m_target->setNeedsAnimationStyleRecalc(); |
129 } | 129 } |
130 | 130 |
131 void Animation::clearEffects() | 131 void Animation::clearEffects() |
132 { | 132 { |
133 ASSERT(player()); | 133 ASSERT(player()); |
134 ASSERT(m_activeInAnimationStack); | 134 ASSERT(m_activeInAnimationStack); |
135 ensureAnimationStack(m_target.get()).remove(this); | 135 ensureAnimationStack(m_target.get()).remove(this); |
136 | 136 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 void Animation::pauseAnimationForTestingOnCompositor(double pauseTime) | 242 void Animation::pauseAnimationForTestingOnCompositor(double pauseTime) |
243 { | 243 { |
244 ASSERT(hasActiveAnimationsOnCompositor()); | 244 ASSERT(hasActiveAnimationsOnCompositor()); |
245 if (!m_target || !m_target->renderer()) | 245 if (!m_target || !m_target->renderer()) |
246 return; | 246 return; |
247 for (size_t i = 0; i < m_compositorAnimationIds.size(); ++i) | 247 for (size_t i = 0; i < m_compositorAnimationIds.size(); ++i) |
248 CompositorAnimations::instance()->pauseAnimationForTestingOnCompositor(*
m_target.get(), m_compositorAnimationIds[i], pauseTime); | 248 CompositorAnimations::instance()->pauseAnimationForTestingOnCompositor(*
m_target.get(), m_compositorAnimationIds[i], pauseTime); |
249 } | 249 } |
250 | 250 |
251 } // namespace WebCore | 251 } // namespace WebCore |
OLD | NEW |