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

Unified Diff: Source/modules/compositorworker/CompositorWorkerGlobalScope.h

Issue 1047783002: compositor-worker: Allow registering compositor-frame 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 | « no previous file | Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/compositorworker/CompositorWorkerGlobalScope.h
diff --git a/Source/modules/compositorworker/CompositorWorkerGlobalScope.h b/Source/modules/compositorworker/CompositorWorkerGlobalScope.h
index 04b60198eecea27771ee6b0a42b32d3c52b63527..f5c48eb7dd03a58a5af1ac5dddecf68079fefee1 100644
--- a/Source/modules/compositorworker/CompositorWorkerGlobalScope.h
+++ b/Source/modules/compositorworker/CompositorWorkerGlobalScope.h
@@ -5,6 +5,7 @@
#ifndef CompositorWorkerGlobalScope_h
#define CompositorWorkerGlobalScope_h
+#include "core/dom/FrameRequestCallbackCollection.h"
#include "core/dom/MessagePort.h"
#include "core/workers/WorkerGlobalScope.h"
@@ -25,7 +26,9 @@ public:
void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue>, const MessagePortArray*, ExceptionState&);
DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
- void executeCompositorFrameCallbacks(double monotonicTimeNow);
+ int requestAnimationFrame(FrameRequestCallback*);
+ void cancelAnimationFrame(int id);
+ void executeAnimationFrameCallbacks(double highResTimeNow);
// ExecutionContext:
bool isCompositorWorkerGlobalScope() const override { return true; }
@@ -33,6 +36,8 @@ public:
private:
CompositorWorkerGlobalScope(const KURL&, const String& userAgent, CompositorWorkerThread*, double timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<WorkerClients>);
CompositorWorkerThread* thread() const;
+
+ FrameRequestCallbackCollection m_callbackCollection;
};
} // namespace blink
« no previous file with comments | « no previous file | Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698