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 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef CompositorPendingAnimations_h | 31 #ifndef CompositorPendingAnimations_h |
32 #define CompositorPendingAnimations_h | 32 #define CompositorPendingAnimations_h |
33 | 33 |
| 34 #include "platform/heap/Handle.h" |
34 #include "wtf/Vector.h" | 35 #include "wtf/Vector.h" |
35 | 36 |
36 namespace WebCore { | 37 namespace WebCore { |
37 | 38 |
38 class AnimationPlayer; | 39 class AnimationPlayer; |
39 | 40 |
40 // Manages the starting of pending animations on the compositor following a | 41 // Manages the starting of pending animations on the compositor following a |
41 // compositing update. | 42 // compositing update. |
42 // For CSS Animations, used to synchronize the start of main-thread animations | 43 // For CSS Animations, used to synchronize the start of main-thread animations |
43 // with compositor animations when both classes of CSS Animations are triggered | 44 // with compositor animations when both classes of CSS Animations are triggered |
44 // by the same recalc | 45 // by the same recalc |
45 class CompositorPendingAnimations FINAL { | 46 class CompositorPendingAnimations FINAL { |
| 47 DISALLOW_ALLOCATION(); |
46 public: | 48 public: |
47 void add(AnimationPlayer*); | 49 void add(AnimationPlayer*); |
48 // Returns whether we are waiting for an animation to start and should | 50 // Returns whether we are waiting for an animation to start and should |
49 // service again on the next frame. | 51 // service again on the next frame. |
50 bool startPendingAnimations(); | 52 bool startPendingAnimations(); |
51 void notifyCompositorAnimationStarted(double monotonicAnimationStartTime); | 53 void notifyCompositorAnimationStarted(double monotonicAnimationStartTime); |
52 | 54 |
| 55 void trace(Visitor*); |
| 56 |
53 private: | 57 private: |
54 Vector<RefPtr<AnimationPlayer> > m_pending; | 58 WillBeHeapVector<RefPtrWillBeMember<AnimationPlayer> > m_pending; |
55 Vector<RefPtr<AnimationPlayer> > m_waitingForCompositorAnimationStart; | 59 WillBeHeapVector<RefPtrWillBeMember<AnimationPlayer> > m_waitingForComposito
rAnimationStart; |
56 }; | 60 }; |
57 | 61 |
58 } // namespace WebCore | 62 } // namespace WebCore |
59 | 63 |
60 #endif | 64 #endif |
OLD | NEW |