| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 if (player() && !previouslyInEffect) { | 81 if (player() && !previouslyInEffect) { |
| 82 ensureAnimationStack(m_target.get()).add(this); | 82 ensureAnimationStack(m_target.get()).add(this); |
| 83 m_activeInAnimationStack = true; | 83 m_activeInAnimationStack = true; |
| 84 } | 84 } |
| 85 | 85 |
| 86 double iteration = currentIteration(); | 86 double iteration = currentIteration(); |
| 87 ASSERT(iteration >= 0); | 87 ASSERT(iteration >= 0); |
| 88 // FIXME: Handle iteration values which overflow int. | 88 // FIXME: Handle iteration values which overflow int. |
| 89 m_compositableValues = m_effect->sample(static_cast<int>(iteration), timeFra
ction()); | 89 m_compositableValues = m_effect->sample(static_cast<int>(iteration), timeFra
ction()); |
| 90 if (player()) { | 90 if (player()) { |
| 91 m_target->setNeedsStyleRecalc(LocalStyleChange, StyleChangeFromRenderer)
; | 91 m_target->setNeedsAnimationStyleRecalc(); |
| 92 return true; | 92 return true; |
| 93 } | 93 } |
| 94 return false; | 94 return false; |
| 95 } | 95 } |
| 96 | 96 |
| 97 void Animation::clearEffects() | 97 void Animation::clearEffects() |
| 98 { | 98 { |
| 99 ASSERT(player()); | 99 ASSERT(player()); |
| 100 ASSERT(m_activeInAnimationStack); | 100 ASSERT(m_activeInAnimationStack); |
| 101 ensureAnimationStack(m_target.get()).remove(this); | 101 ensureAnimationStack(m_target.get()).remove(this); |
| 102 cancelAnimationOnCompositor(); | 102 cancelAnimationOnCompositor(); |
| 103 m_activeInAnimationStack = false; | 103 m_activeInAnimationStack = false; |
| 104 m_compositableValues.clear(); | 104 m_compositableValues.clear(); |
| 105 m_target->setNeedsStyleRecalc(LocalStyleChange, StyleChangeFromRenderer); | 105 m_target->setNeedsAnimationStyleRecalc(); |
| 106 } | 106 } |
| 107 | 107 |
| 108 bool Animation::updateChildrenAndEffects() const | 108 bool Animation::updateChildrenAndEffects() const |
| 109 { | 109 { |
| 110 if (!m_effect) | 110 if (!m_effect) |
| 111 return false; | 111 return false; |
| 112 | 112 |
| 113 if (isInEffect()) | 113 if (isInEffect()) |
| 114 return const_cast<Animation*>(this)->applyEffects(m_activeInAnimationSta
ck); | 114 return const_cast<Animation*>(this)->applyEffects(m_activeInAnimationSta
ck); |
| 115 | 115 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 void Animation::pauseAnimationForTestingOnCompositor(double pauseTime) | 194 void Animation::pauseAnimationForTestingOnCompositor(double pauseTime) |
| 195 { | 195 { |
| 196 ASSERT(hasActiveAnimationsOnCompositor()); | 196 ASSERT(hasActiveAnimationsOnCompositor()); |
| 197 if (!m_target || !m_target->renderer()) | 197 if (!m_target || !m_target->renderer()) |
| 198 return; | 198 return; |
| 199 for (size_t i = 0; i < m_compositorAnimationIds.size(); ++i) | 199 for (size_t i = 0; i < m_compositorAnimationIds.size(); ++i) |
| 200 CompositorAnimations::instance()->pauseAnimationForTestingOnCompositor(*
m_target.get(), m_compositorAnimationIds[i], pauseTime); | 200 CompositorAnimations::instance()->pauseAnimationForTestingOnCompositor(*
m_target.get(), m_compositorAnimationIds[i], pauseTime); |
| 201 } | 201 } |
| 202 | 202 |
| 203 } // namespace WebCore | 203 } // namespace WebCore |
| OLD | NEW |