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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 compositor_timeline_ = CompositorAnimationTimeline::Create(); | 80 compositor_timeline_ = CompositorAnimationTimeline::Create(); |
81 | 81 |
82 DCHECK(document); | 82 DCHECK(document); |
83 } | 83 } |
84 | 84 |
85 bool AnimationTimeline::IsActive() { | 85 bool AnimationTimeline::IsActive() { |
86 return document_ && document_->GetPage(); | 86 return document_ && document_->GetPage(); |
87 } | 87 } |
88 | 88 |
89 void AnimationTimeline::AnimationAttached(Animation& animation) { | 89 void AnimationTimeline::AnimationAttached(Animation& animation) { |
90 DCHECK_EQ(animation.timeline(), this); | 90 DCHECK_EQ(animation.TimelineInternal(), this); |
91 DCHECK(!animations_.Contains(&animation)); | 91 DCHECK(!animations_.Contains(&animation)); |
92 animations_.insert(&animation); | 92 animations_.insert(&animation); |
93 } | 93 } |
94 | 94 |
95 Animation* AnimationTimeline::Play(AnimationEffectReadOnly* child) { | 95 Animation* AnimationTimeline::Play(AnimationEffectReadOnly* child) { |
96 if (!document_) | 96 if (!document_) |
97 return nullptr; | 97 return nullptr; |
98 | 98 |
99 Animation* animation = Animation::Create(child, this); | 99 Animation* animation = Animation::Create(child, this); |
100 DCHECK(animations_.Contains(animation)); | 100 DCHECK(animations_.Contains(animation)); |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 void AnimationTimeline::InvalidateKeyframeEffects(const TreeScope& tree_scope) { | 315 void AnimationTimeline::InvalidateKeyframeEffects(const TreeScope& tree_scope) { |
316 for (const auto& animation : animations_) | 316 for (const auto& animation : animations_) |
317 animation->InvalidateKeyframeEffect(tree_scope); | 317 animation->InvalidateKeyframeEffect(tree_scope); |
318 } | 318 } |
319 | 319 |
320 DEFINE_TRACE(AnimationTimeline) { | 320 DEFINE_TRACE(AnimationTimeline) { |
321 visitor->Trace(document_); | 321 visitor->Trace(document_); |
322 visitor->Trace(timing_); | 322 visitor->Trace(timing_); |
323 visitor->Trace(animations_needing_update_); | 323 visitor->Trace(animations_needing_update_); |
324 visitor->Trace(animations_); | 324 visitor->Trace(animations_); |
| 325 SuperAnimationTimeline::Trace(visitor); |
325 } | 326 } |
326 | 327 |
327 } // namespace blink | 328 } // namespace blink |
OLD | NEW |