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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 timeline->animationAttached(*animation); | 74 timeline->animationAttached(*animation); |
75 animation->attachCompositorTimeline(); | 75 animation->attachCompositorTimeline(); |
76 } | 76 } |
77 | 77 |
78 return animation; | 78 return animation; |
79 } | 79 } |
80 | 80 |
81 Animation::Animation(ExecutionContext* executionContext, | 81 Animation::Animation(ExecutionContext* executionContext, |
82 AnimationTimeline& timeline, | 82 AnimationTimeline& timeline, |
83 AnimationEffectReadOnly* content) | 83 AnimationEffectReadOnly* content) |
84 : ActiveScriptWrappable(this), | 84 : SuspendableObject(executionContext), |
85 SuspendableObject(executionContext), | |
86 m_playState(Idle), | 85 m_playState(Idle), |
87 m_playbackRate(1), | 86 m_playbackRate(1), |
88 m_startTime(nullValue()), | 87 m_startTime(nullValue()), |
89 m_holdTime(0), | 88 m_holdTime(0), |
90 m_sequenceNumber(nextSequenceNumber()), | 89 m_sequenceNumber(nextSequenceNumber()), |
91 m_content(content), | 90 m_content(content), |
92 m_timeline(&timeline), | 91 m_timeline(&timeline), |
93 m_paused(false), | 92 m_paused(false), |
94 m_held(false), | 93 m_held(false), |
95 m_isPausedForTesting(false), | 94 m_isPausedForTesting(false), |
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 DCHECK(!m_compositorPlayer); | 1142 DCHECK(!m_compositorPlayer); |
1144 } | 1143 } |
1145 | 1144 |
1146 void Animation::CompositorAnimationPlayerHolder::detach() { | 1145 void Animation::CompositorAnimationPlayerHolder::detach() { |
1147 DCHECK(m_compositorPlayer); | 1146 DCHECK(m_compositorPlayer); |
1148 m_compositorPlayer->setAnimationDelegate(nullptr); | 1147 m_compositorPlayer->setAnimationDelegate(nullptr); |
1149 m_animation = nullptr; | 1148 m_animation = nullptr; |
1150 m_compositorPlayer.reset(); | 1149 m_compositorPlayer.reset(); |
1151 } | 1150 } |
1152 } // namespace blink | 1151 } // namespace blink |
OLD | NEW |