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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 void KeyframeEffect::pauseAnimationForTestingOnCompositor(double pauseTime) | 347 void KeyframeEffect::pauseAnimationForTestingOnCompositor(double pauseTime) |
348 { | 348 { |
349 ASSERT(hasActiveAnimationsOnCompositor()); | 349 ASSERT(hasActiveAnimationsOnCompositor()); |
350 if (!m_target || !m_target->layoutObject()) | 350 if (!m_target || !m_target->layoutObject()) |
351 return; | 351 return; |
352 ASSERT(animation()); | 352 ASSERT(animation()); |
353 for (const auto& compositorAnimationId : m_compositorAnimationIds) | 353 for (const auto& compositorAnimationId : m_compositorAnimationIds) |
354 CompositorAnimations::pauseAnimationForTestingOnCompositor(*m_target, *a
nimation(), compositorAnimationId, pauseTime); | 354 CompositorAnimations::pauseAnimationForTestingOnCompositor(*m_target, *a
nimation(), compositorAnimationId, pauseTime); |
355 } | 355 } |
356 | 356 |
357 bool KeyframeEffect::canAttachCompositedLayers() const | |
358 { | |
359 if (!m_target || !animation()) | |
360 return false; | |
361 | |
362 return CompositorAnimations::canAttachCompositedLayers(*m_target, *animation
()); | |
363 } | |
364 | |
365 void KeyframeEffect::attachCompositedLayers() | 357 void KeyframeEffect::attachCompositedLayers() |
366 { | 358 { |
367 ASSERT(m_target); | 359 ASSERT(m_target); |
368 ASSERT(animation()); | 360 ASSERT(animation()); |
369 CompositorAnimations::attachCompositedLayers(*m_target, *animation()); | 361 CompositorAnimations::attachCompositedLayers(*m_target, *animation()); |
370 } | 362 } |
371 | 363 |
372 DEFINE_TRACE(KeyframeEffect) | 364 DEFINE_TRACE(KeyframeEffect) |
373 { | 365 { |
374 visitor->trace(m_target); | 366 visitor->trace(m_target); |
375 visitor->trace(m_model); | 367 visitor->trace(m_model); |
376 visitor->trace(m_sampledEffect); | 368 visitor->trace(m_sampledEffect); |
377 AnimationEffect::trace(visitor); | 369 AnimationEffect::trace(visitor); |
378 } | 370 } |
379 | 371 |
380 } // namespace blink | 372 } // namespace blink |
OLD | NEW |