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

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

Issue 1900423004: [compositorworker] Register compositor proxies with proxy client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor update Created 4 years, 6 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
index 767117edd37e7750ebb97832ab30f914d5746c9a..e0aa025b5bf82e2e8e56e824387e486c38b45b15 100644
--- a/third_party/WebKit/Source/web/CompositorProxyClientImpl.h
+++ b/third_party/WebKit/Source/web/CompositorProxyClientImpl.h
@@ -6,6 +6,7 @@
#define CompositorProxyClientImpl_h
#include "core/dom/CompositorProxyClient.h"
+#include "platform/heap/Handle.h"
#include "wtf/Noncopyable.h"
namespace blink {
@@ -19,7 +20,7 @@ class WorkerGlobalScope;
// 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 {
+class CompositorProxyClientImpl final : public GarbageCollectedFinalized<CompositorProxyClientImpl>, public CompositorProxyClient {
USING_GARBAGE_COLLECTED_MIXIN(CompositorProxyClientImpl);
WTF_MAKE_NONCOPYABLE(CompositorProxyClientImpl);
public:
@@ -33,6 +34,8 @@ public:
// CompositorProxyClient:
void setGlobalScope(WorkerGlobalScope*) override;
void requestAnimationFrame() override;
+ void registerCompositorProxy(CompositorProxy*) override;
+ void unregisterCompositorProxy(CompositorProxy*) override;
private:
bool executeAnimationFrameCallbacks(double monotonicTimeNow);
@@ -41,6 +44,10 @@ private:
Member<CompositorWorkerGlobalScope> m_globalScope;
bool m_requestedAnimationFrameCallbacks;
+
+ typedef HeapVector<Member<CompositorProxy>> ProxyVector;
+ typedef HeapHashMap<uint64_t, Member<ProxyVector>> ProxyMap;
haraken 2016/06/08 00:10:36 Can you use a HashMap/HashSet of WeakMembers? Then
majidvp 2016/06/09 20:34:21 Done.
+ ProxyMap m_proxyMap;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698