| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 #include "core/animation/Player.h" | 34 #include "core/animation/Player.h" |
| 35 #include "wtf/Vector.h" | 35 #include "wtf/Vector.h" |
| 36 | 36 |
| 37 namespace WebCore { | 37 namespace WebCore { |
| 38 | 38 |
| 39 // Used to synchronize the start of main-thread animations with compositor | 39 // Used to synchronize the start of main-thread animations with compositor |
| 40 // animations when both classes of CSS Animations are triggered by the same reca
lc | 40 // animations when both classes of CSS Animations are triggered by the same reca
lc |
| 41 class CSSPendingAnimations FINAL { | 41 class CSSPendingAnimations FINAL { |
| 42 public: | 42 public: |
| 43 void add(Player* player) { m_pending.append(player); }; | 43 void add(Player*); |
| 44 void startPendingAnimations(); | 44 void startPendingAnimationsAfterStyleRecalc(); |
| 45 void startPendingAnimationsAfterCompositingUpdate(); |
| 45 void notifyCompositorAnimationStarted(double monotonicAnimationStartTime); | 46 void notifyCompositorAnimationStarted(double monotonicAnimationStartTime); |
| 46 | 47 |
| 47 private: | 48 private: |
| 48 Vector<RefPtr<Player> > m_pending; | 49 Vector<std::pair<RefPtr<Player>, double> > m_pending; |
| 49 Vector<RefPtr<Player> > m_waitingForCompositorAnimationStart; | 50 Vector<RefPtr<Player> > m_waitingForCompositorAnimationStart; |
| 51 double m_pendingTime; |
| 50 }; | 52 }; |
| 51 | 53 |
| 52 } // namespace WebCore | 54 } // namespace WebCore |
| 53 | 55 |
| 54 #endif | 56 #endif |
| OLD | NEW |