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

Unified Diff: third_party/WebKit/Source/web/CompositorMutatorImpl.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/CompositorMutatorImpl.h
diff --git a/third_party/WebKit/Source/web/CompositorMutatorImpl.h b/third_party/WebKit/Source/web/CompositorMutatorImpl.h
new file mode 100644
index 0000000000000000000000000000000000000000..4fb3ddac024c26915be69e6c54c16883b826e5a2
--- /dev/null
+++ b/third_party/WebKit/Source/web/CompositorMutatorImpl.h
@@ -0,0 +1,60 @@
+// Copyright 2016 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 CompositorMutatorImpl_h
+#define CompositorMutatorImpl_h
+
+#include "platform/graphics/CompositorMutator.h"
+#include "platform/heap/Handle.h"
+#include "platform/heap/HeapAllocator.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
+
+namespace blink {
+
+class CompositorProxy;
+class CompositorProxyClientImpl;
+class CompositorWorkerGlobalScope;
+class CompositorMutatorClient;
+class CustomCompositorAnimationManager;
+class WaitableEvent;
+
+class CompositorMutatorImpl final : public CompositorMutator {
jbroman 2016/04/29 19:42:22 Class comment, please. Maybe something along the l
flackr 2016/05/03 22:24:54 Done.
+ WTF_MAKE_NONCOPYABLE(CompositorMutatorImpl);
+
+public:
+ static CompositorMutatorImpl* create();
+ ~CompositorMutatorImpl() override;
+
+ DEFINE_INLINE_TRACE()
+ {
+ CompositorMutator::trace(visitor);
+ visitor->trace(m_proxyClients);
+ }
+
+ // CompositorMutator implementation.
+ bool mutate(double monotonicTimeNow) override;
+
+ void registerProxyClient(CompositorProxyClientImpl*);
+ void unregisterProxyClient(CompositorProxyClientImpl*);
+
+ void setNeedsMutate();
+
+ void setClient(CompositorMutatorClient* client) { m_client = client; }
+ CustomCompositorAnimationManager* animationManager() { return m_animationManager.get(); }
+
+private:
+ CompositorMutatorImpl();
+
+ using ProxyClients = HeapHashSet<WeakMember<CompositorProxyClientImpl>>;
+ ProxyClients m_proxyClients;
+
+ OwnPtr<CustomCompositorAnimationManager> m_animationManager;
+ CompositorMutatorClient* m_client;
+};
+
+} // namespace blink
+
+#endif // CompositorMutatorImpl_h

Powered by Google App Engine
This is Rietveld 408576698