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 |
357 void KeyframeEffect::attachCompositedLayers() | 365 void KeyframeEffect::attachCompositedLayers() |
358 { | 366 { |
359 ASSERT(m_target); | 367 ASSERT(m_target); |
360 ASSERT(animation()); | 368 ASSERT(animation()); |
361 CompositorAnimations::attachCompositedLayers(*m_target, *animation()); | 369 CompositorAnimations::attachCompositedLayers(*m_target, *animation()); |
362 } | 370 } |
363 | 371 |
364 DEFINE_TRACE(KeyframeEffect) | 372 DEFINE_TRACE(KeyframeEffect) |
365 { | 373 { |
366 visitor->trace(m_target); | 374 visitor->trace(m_target); |
367 visitor->trace(m_model); | 375 visitor->trace(m_model); |
368 visitor->trace(m_sampledEffect); | 376 visitor->trace(m_sampledEffect); |
369 AnimationEffect::trace(visitor); | 377 AnimationEffect::trace(visitor); |
370 } | 378 } |
371 | 379 |
372 } // namespace blink | 380 } // namespace blink |
OLD | NEW |