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

Unified Diff: third_party/WebKit/Source/core/animation/CompositorPendingAnimations.h

Issue 2616593002: Move core/animation timers to frame-specific task runners. (Closed)
Patch Set: Created 3 years, 12 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/CompositorPendingAnimations.h
diff --git a/third_party/WebKit/Source/core/animation/CompositorPendingAnimations.h b/third_party/WebKit/Source/core/animation/CompositorPendingAnimations.h
index 82e14763c8da7f096d74dbfc9b54b5206cee4757..22fd6c5b60782cd0a7bfc5ee675ebb560f4a902a 100644
--- a/third_party/WebKit/Source/core/animation/CompositorPendingAnimations.h
+++ b/third_party/WebKit/Source/core/animation/CompositorPendingAnimations.h
@@ -33,6 +33,7 @@
#include "core/CoreExport.h"
#include "core/animation/Animation.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "platform/Timer.h"
#include "platform/heap/Handle.h"
#include "wtf/Vector.h"
@@ -47,8 +48,10 @@ namespace blink {
class CORE_EXPORT CompositorPendingAnimations final
: public GarbageCollectedFinalized<CompositorPendingAnimations> {
public:
- CompositorPendingAnimations()
- : m_timer(this, &CompositorPendingAnimations::timerFired),
+ explicit CompositorPendingAnimations(Document& document)
+ : m_timer(TaskRunnerHelper::get(TaskType::UnspecedTimer, &document),
+ this,
+ &CompositorPendingAnimations::timerFired),
m_compositorGroup(1) {}
void add(Animation*);
@@ -65,7 +68,7 @@ class CORE_EXPORT CompositorPendingAnimations final
HeapVector<Member<Animation>> m_pending;
HeapVector<Member<Animation>> m_waitingForCompositorAnimationStart;
- Timer<CompositorPendingAnimations> m_timer;
+ TaskRunnerTimer<CompositorPendingAnimations> m_timer;
int m_compositorGroup;
};
« no previous file with comments | « third_party/WebKit/Source/core/animation/AnimationTimeline.h ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698