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

Unified Diff: third_party/WebKit/Source/web/CompositorMutatorImpl.cpp

Issue 2515363002: Introduce AnimationWorkletProxyClient and necessary plumbing to get it in worklet messaging proxy. (Closed)
Patch Set: Remove unnecessary PLATFORM_EXPORT Created 3 years, 10 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.cpp
diff --git a/third_party/WebKit/Source/web/CompositorMutatorImpl.cpp b/third_party/WebKit/Source/web/CompositorMutatorImpl.cpp
index 867cc4b1a8df54f3e906abe9b8263b8e7f97959f..3acbdcb09686a7a8ae1e485056dcbdec01febb1f 100644
--- a/third_party/WebKit/Source/web/CompositorMutatorImpl.cpp
+++ b/third_party/WebKit/Source/web/CompositorMutatorImpl.cpp
@@ -13,7 +13,7 @@
#include "platform/heap/Handle.h"
#include "platform/instrumentation/tracing/TraceEvent.h"
#include "public/platform/Platform.h"
-#include "web/CompositorProxyClientImpl.h"
+#include "web/CompositorAnimator.h"
#include "wtf/PtrUtil.h"
namespace blink {
@@ -47,7 +47,7 @@ std::unique_ptr<CompositorMutatorClient> CompositorMutatorImpl::createClient() {
createCompositorMutatorClient(&mutatorClient, &doneEvent);
}
// TODO(flackr): Instead of waiting for this event, we may be able to just set
- // the mutator on the CompositorProxyClient directly from the compositor
+ // the mutator on the CompositorWorkerProxyClient directly from the compositor
// thread before it gets used there. We still need to make sure we only
// create one mutator though.
doneEvent.wait();
@@ -66,26 +66,27 @@ bool CompositorMutatorImpl::mutate(
// TODO(vollick): we should avoid executing the animation frame
// callbacks if none of the proxies in the global scope are affected by
// m_mutations.
- for (CompositorProxyClientImpl* client : m_proxyClients) {
- if (client->mutate(monotonicTimeNow, stateProvider))
+ for (CompositorAnimator* animator : m_animators) {
+ if (animator->mutate(monotonicTimeNow, stateProvider))
needToReinvoke = true;
}
return needToReinvoke;
}
-void CompositorMutatorImpl::registerProxyClient(
- CompositorProxyClientImpl* client) {
- TRACE_EVENT0("compositor-worker", "CompositorMutatorImpl::registerClient");
- DCHECK(!m_proxyClients.contains(client));
- m_proxyClients.insert(client);
+void CompositorMutatorImpl::registerCompositorAnimator(
+ CompositorAnimator* animator) {
+ TRACE_EVENT0("compositor-worker",
+ "CompositorMutatorImpl::registerCompositorAnimator");
+ DCHECK(!m_animators.contains(animator));
+ m_animators.add(animator);
setNeedsMutate();
}
-void CompositorMutatorImpl::unregisterProxyClient(
- CompositorProxyClientImpl* client) {
- DCHECK(m_proxyClients.contains(client));
- m_proxyClients.remove(client);
+void CompositorMutatorImpl::unregisterCompositorAnimator(
+ CompositorAnimator* animator) {
+ DCHECK(m_animators.contains(animator));
+ m_animators.remove(animator);
}
void CompositorMutatorImpl::setNeedsMutate() {
« no previous file with comments | « third_party/WebKit/Source/web/CompositorMutatorImpl.h ('k') | third_party/WebKit/Source/web/CompositorProxyClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698