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

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

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bring up oilpan support during compositor worker creation and oilpan the compositor mutator and pro… Created 4 years, 8 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..777e5058edb5f50232b1dbd76711debda424fcfe
--- /dev/null
+++ b/third_party/WebKit/Source/web/CompositorProxyClientImpl.h
@@ -0,0 +1,42 @@
+// 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 CompositorMutatorImpl;
+class CompositorWorkerGlobalScope;
+class WorkerGlobalScope;
+
jbroman 2016/04/29 19:42:22 Class comment here, along the lines of the ones gi
jbroman 2016/04/29 19:42:22 Class comment here, along the lines of the ones gi
flackr 2016/05/03 22:24:55 Your description is concise and accurate - I've li
+class CompositorProxyClientImpl final : public GarbageCollectedFinalized<CompositorProxyClientImpl>, public CompositorProxyClient {
jbroman 2016/04/29 19:42:22 nit: does this have any finalization logic? could
flackr 2016/05/03 22:24:54 For now, no. Switched to no finalization - I'll le
+ USING_GARBAGE_COLLECTED_MIXIN(CompositorProxyClientImpl);
+ WTF_MAKE_NONCOPYABLE(CompositorProxyClientImpl);
+public:
+ CompositorProxyClientImpl(CompositorMutatorImpl*, double referenceMonotonicTime);
+ DECLARE_VIRTUAL_TRACE();
+
+ bool mutate(double monotonicTimeNow);
jbroman 2016/04/29 19:42:22 Please comment what the return type means. From re
flackr 2016/05/03 22:24:54 Done.
+
+ // CompositorProxyClient:
+ void setGlobalScope(WorkerGlobalScope*) override;
+ void requestAnimationFrame() override;
+
+private:
+ bool executeAnimationFrameCallbacks(double monotonicTimeNow);
+
+ CompositorMutatorImpl* m_mutator;
+
+ WeakMember<CompositorWorkerGlobalScope> m_globalScope;
+ double m_referenceMonotonicTime;
jbroman 2016/04/29 19:42:22 Why plumb this in separately? Isn't it guaranteed
flackr 2016/05/03 22:24:54 So it is, thanks! Removed.
+ bool m_requestedAnimationFrameCallbacks;
+};
+
+} // namespace blink
+
+#endif // CompositorProxyClientImpl_h

Powered by Google App Engine
This is Rietveld 408576698