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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 { | 288 { |
289 // FIXME: cancelAnimationOnCompositor is called from withins style recalc. | 289 // FIXME: cancelAnimationOnCompositor is called from withins style recalc. |
290 // This queries compositingState, which is not necessarily up to date. | 290 // This queries compositingState, which is not necessarily up to date. |
291 // https://code.google.com/p/chromium/issues/detail?id=339847 | 291 // https://code.google.com/p/chromium/issues/detail?id=339847 |
292 DisableCompositingQueryAsserts disabler; | 292 DisableCompositingQueryAsserts disabler; |
293 if (!hasActiveAnimationsOnCompositor()) | 293 if (!hasActiveAnimationsOnCompositor()) |
294 return; | 294 return; |
295 if (!m_target || !m_target->renderer()) | 295 if (!m_target || !m_target->renderer()) |
296 return; | 296 return; |
297 for (const auto& compositorAnimationId : m_compositorAnimationIds) | 297 for (const auto& compositorAnimationId : m_compositorAnimationIds) |
298 CompositorAnimations::instance()->cancelAnimationOnCompositor(*m_target,
compositorAnimationId); | 298 CompositorAnimations::instance()->cancelAnimationOnCompositor(*m_target,
player(), compositorAnimationId); |
299 m_compositorAnimationIds.clear(); | 299 m_compositorAnimationIds.clear(); |
300 player()->setCompositorPending(true); | 300 player()->setCompositorPending(true); |
301 } | 301 } |
302 | 302 |
303 void Animation::cancelIncompatibleAnimationsOnCompositor() | 303 void Animation::cancelIncompatibleAnimationsOnCompositor() |
304 { | 304 { |
305 if (m_target && player() && effect()) | 305 if (m_target && player() && effect()) |
306 CompositorAnimations::instance()->cancelIncompatibleAnimationsOnComposit
or(*m_target, *player(), *effect()); | 306 CompositorAnimations::instance()->cancelIncompatibleAnimationsOnComposit
or(*m_target, *player(), *effect()); |
307 } | 307 } |
308 | 308 |
309 void Animation::pauseAnimationForTestingOnCompositor(double pauseTime) | 309 void Animation::pauseAnimationForTestingOnCompositor(double pauseTime) |
310 { | 310 { |
311 ASSERT(hasActiveAnimationsOnCompositor()); | 311 ASSERT(hasActiveAnimationsOnCompositor()); |
312 if (!m_target || !m_target->renderer()) | 312 if (!m_target || !m_target->renderer()) |
313 return; | 313 return; |
314 for (const auto& compositorAnimationId : m_compositorAnimationIds) | 314 for (const auto& compositorAnimationId : m_compositorAnimationIds) |
315 CompositorAnimations::instance()->pauseAnimationForTestingOnCompositor(*
m_target, compositorAnimationId, pauseTime); | 315 CompositorAnimations::instance()->pauseAnimationForTestingOnCompositor(*
m_target, player(), compositorAnimationId, pauseTime); |
316 } | 316 } |
317 | 317 |
318 void Animation::trace(Visitor* visitor) | 318 void Animation::trace(Visitor* visitor) |
319 { | 319 { |
320 visitor->trace(m_target); | 320 visitor->trace(m_target); |
321 visitor->trace(m_effect); | 321 visitor->trace(m_effect); |
322 visitor->trace(m_sampledEffect); | 322 visitor->trace(m_sampledEffect); |
323 AnimationNode::trace(visitor); | 323 AnimationNode::trace(visitor); |
324 } | 324 } |
325 | 325 |
326 } // namespace blink | 326 } // namespace blink |
OLD | NEW |