| 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 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 } | 942 } |
| 943 | 943 |
| 944 void Animation::attachCompositedLayers() | 944 void Animation::attachCompositedLayers() |
| 945 { | 945 { |
| 946 if (!m_compositorPlayer) | 946 if (!m_compositorPlayer) |
| 947 return; | 947 return; |
| 948 | 948 |
| 949 ASSERT(m_content); | 949 ASSERT(m_content); |
| 950 ASSERT(m_content->isKeyframeEffect()); | 950 ASSERT(m_content->isKeyframeEffect()); |
| 951 | 951 |
| 952 toKeyframeEffect(m_content.get())->attachCompositedLayers(); | 952 if (toKeyframeEffect(m_content.get())->canAttachCompositedLayers()) |
| 953 toKeyframeEffect(m_content.get())->attachCompositedLayers(); |
| 953 } | 954 } |
| 954 | 955 |
| 955 void Animation::detachCompositedLayers() | 956 void Animation::detachCompositedLayers() |
| 956 { | 957 { |
| 957 if (m_compositorPlayer && m_compositorPlayer->isElementAttached()) | 958 if (m_compositorPlayer && m_compositorPlayer->isLayerAttached()) |
| 958 m_compositorPlayer->detachElement(); | 959 m_compositorPlayer->detachLayer(); |
| 959 } | 960 } |
| 960 | 961 |
| 961 void Animation::notifyAnimationStarted(double monotonicTime, int group) | 962 void Animation::notifyAnimationStarted(double monotonicTime, int group) |
| 962 { | 963 { |
| 963 timeline()->document()->compositorPendingAnimations().notifyCompositorAnimat
ionStarted(monotonicTime, group); | 964 timeline()->document()->compositorPendingAnimations().notifyCompositorAnimat
ionStarted(monotonicTime, group); |
| 964 } | 965 } |
| 965 | 966 |
| 966 Animation::PlayStateUpdateScope::PlayStateUpdateScope(Animation& animation, Timi
ngUpdateReason reason, CompositorPendingChange compositorPendingChange) | 967 Animation::PlayStateUpdateScope::PlayStateUpdateScope(Animation& animation, Timi
ngUpdateReason reason, CompositorPendingChange compositorPendingChange) |
| 967 : m_animation(animation) | 968 : m_animation(animation) |
| 968 , m_initialPlayState(m_animation->playStateInternal()) | 969 , m_initialPlayState(m_animation->playStateInternal()) |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 visitor->trace(m_timeline); | 1085 visitor->trace(m_timeline); |
| 1085 visitor->trace(m_pendingFinishedEvent); | 1086 visitor->trace(m_pendingFinishedEvent); |
| 1086 visitor->trace(m_pendingCancelledEvent); | 1087 visitor->trace(m_pendingCancelledEvent); |
| 1087 visitor->trace(m_finishedPromise); | 1088 visitor->trace(m_finishedPromise); |
| 1088 visitor->trace(m_readyPromise); | 1089 visitor->trace(m_readyPromise); |
| 1089 EventTargetWithInlineData::trace(visitor); | 1090 EventTargetWithInlineData::trace(visitor); |
| 1090 ActiveDOMObject::trace(visitor); | 1091 ActiveDOMObject::trace(visitor); |
| 1091 } | 1092 } |
| 1092 | 1093 |
| 1093 } // namespace blink | 1094 } // namespace blink |
| OLD | NEW |