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

Unified Diff: Source/core/dom/ScriptedAnimationController.h

Issue 1043903003: rAF: Introduce FrameRequestCallbackCollection for managing rAF callbacks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 9 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
« no previous file with comments | « Source/core/dom/RequestAnimationFrameCallback.idl ('k') | Source/core/dom/ScriptedAnimationController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ScriptedAnimationController.h
diff --git a/Source/core/dom/ScriptedAnimationController.h b/Source/core/dom/ScriptedAnimationController.h
index a833730103c899a446ff1c7f496cf096768a3ede..3908cf6f8c231ed1325ce3fd40c400ec6ffe2c43 100644
--- a/Source/core/dom/ScriptedAnimationController.h
+++ b/Source/core/dom/ScriptedAnimationController.h
@@ -26,6 +26,7 @@
#ifndef ScriptedAnimationController_h
#define ScriptedAnimationController_h
+#include "core/dom/FrameRequestCallbackCollection.h"
#include "platform/heap/Handle.h"
#include "wtf/ListHashSet.h"
#include "wtf/RefCounted.h"
@@ -39,8 +40,8 @@ namespace blink {
class Document;
class Event;
class EventTarget;
+class FrameRequestCallback;
class MediaQueryListListener;
-class RequestAnimationFrameCallback;
class ScriptedAnimationController : public RefCountedWillBeGarbageCollected<ScriptedAnimationController> {
DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(ScriptedAnimationController);
@@ -55,7 +56,7 @@ public:
typedef int CallbackId;
- int registerCallback(RequestAnimationFrameCallback*);
+ int registerCallback(FrameRequestCallback*);
void cancelCallback(CallbackId);
void serviceScriptedAnimations(double monotonicTimeNow);
@@ -76,12 +77,8 @@ private:
void executeCallbacks(double monotonicTimeNow);
void callMediaQueryListListeners();
- typedef PersistentHeapVectorWillBeHeapVector<Member<RequestAnimationFrameCallback>> CallbackList;
- CallbackList m_callbacks;
- CallbackList m_callbacksToInvoke; // only non-empty while inside executeCallbacks
-
RawPtrWillBeMember<Document> m_document;
- CallbackId m_nextCallbackId;
+ FrameRequestCallbackCollection m_callbackCollection;
int m_suspendCount;
WillBeHeapVector<RefPtrWillBeMember<Event>> m_eventQueue;
WillBeHeapListHashSet<std::pair<RawPtrWillBeMember<const EventTarget>, const StringImpl*>> m_perFrameEvents;
« no previous file with comments | « Source/core/dom/RequestAnimationFrameCallback.idl ('k') | Source/core/dom/ScriptedAnimationController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698