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