Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: Source/core/animation/css/CSSPendingAnimations.h

Issue 73643004: Web Animations: Extract an API for servicing animations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Switch to references for non-null params. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698