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

Unified Diff: third_party/WebKit/Source/web/CompositorProxyClientImpl.h

Issue 1956893003: compositor-worker: Add CompositorProxyClient worker client of CompositorWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use local root frame and remove unneeded includes. Created 4 years, 7 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/web/CompositorProxyClientImpl.h
diff --git a/third_party/WebKit/Source/web/CompositorProxyClientImpl.h b/third_party/WebKit/Source/web/CompositorProxyClientImpl.h
new file mode 100644
index 0000000000000000000000000000000000000000..8c0714b6ee6ae36c725a20372414f454da578176
--- /dev/null
+++ b/third_party/WebKit/Source/web/CompositorProxyClientImpl.h
@@ -0,0 +1,45 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CompositorProxyClientImpl_h
+#define CompositorProxyClientImpl_h
+
+#include "core/dom/CompositorProxyClient.h"
+#include "wtf/Noncopyable.h"
+
+namespace blink {
+
+class CompositorWorkerGlobalScope;
+class WorkerGlobalScope;
+
+// Mediates between one CompositorWorkerGlobalScope and the associated CompositorMutatorImpl.
+// There is one CompositorProxyClientImpl per worker but there may be multiple for a given
+// mutator, e.g. if a single document creates multiple CompositorWorker objects.
+//
+// Should be accessed only on the compositor thread.
+class CompositorProxyClientImpl final : public GarbageCollected<CompositorProxyClientImpl>, public CompositorProxyClient {
+ USING_GARBAGE_COLLECTED_MIXIN(CompositorProxyClientImpl);
+ WTF_MAKE_NONCOPYABLE(CompositorProxyClientImpl);
+public:
+ CompositorProxyClientImpl();
+ DECLARE_VIRTUAL_TRACE();
+
+ // Runs the animation frame callback for the frame starting at the given time.
+ // Returns true if another animation frame was requested (i.e. should be reinvoked next frame).
+ bool mutate(double monotonicTimeNow);
+
+ // CompositorProxyClient:
+ void setGlobalScope(WorkerGlobalScope*) override;
+ void runAnimationFrameCallbacks() override;
+
+private:
+ bool executeAnimationFrameCallbacks(double monotonicTimeNow);
+
+ Member<CompositorWorkerGlobalScope> m_globalScope;
+ bool m_requestedAnimationFrameCallbacks;
+};
+
+} // namespace blink
+
+#endif // CompositorProxyClientImpl_h
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.cpp ('k') | third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698