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

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

Issue 2515363002: Introduce AnimationWorkletProxyClient and necessary plumbing to get it in worklet messaging proxy. (Closed)
Patch Set: address feedback Created 4 years, 1 month 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/AnimationWorkletProxyClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/AnimationWorkletProxyClientImpl.cpp b/third_party/WebKit/Source/web/AnimationWorkletProxyClientImpl.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..b626cc4620f47e205c4484d0650250b6cd2be0fe
--- /dev/null
+++ b/third_party/WebKit/Source/web/AnimationWorkletProxyClientImpl.cpp
@@ -0,0 +1,45 @@
+// 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.
+
+#include "web/AnimationWorkletProxyClientImpl.h"
+
+#include "core/dom/CompositorProxy.h"
+#include "platform/graphics/CompositorAnimator.h"
+#include "platform/graphics/CompositorMutableStateProvider.h"
+#include "web/CompositorMutatorImpl.h"
+
+namespace blink {
+
+AnimationWorkletProxyClientImpl::AnimationWorkletProxyClientImpl(
+ CompositorMutatorImpl* mutator)
+ : m_mutator(mutator) {
+ DCHECK(isMainThread());
+}
+
+DEFINE_TRACE(AnimationWorkletProxyClientImpl) {
+ AnimationWorkletProxyClient::trace(visitor);
+ CompositorAnimator::trace(visitor);
+ visitor->trace(m_proxies);
+}
+
+bool AnimationWorkletProxyClientImpl::mutate(
+ double monotonicTimeNow,
+ CompositorMutableStateProvider* provider) {
+ // TODO(majidvp): actually call JS |animate| callbacks.
+
+ // Always request another rAF for now.
+ return true;
+}
+
+void AnimationWorkletProxyClientImpl::registerCompositorProxy(
+ CompositorProxy* proxy) {
+ m_proxies.add(proxy);
haraken 2016/11/29 02:35:36 DCHECK(!isMainThread()) ? I'm a fan of having DCH
majidvp 2017/01/20 15:48:57 Done.
+}
+
+void AnimationWorkletProxyClientImpl::unregisterCompositorProxy(
+ CompositorProxy* proxy) {
+ m_proxies.remove(proxy);
haraken 2016/11/29 02:35:36 DCHECK(!isMainThread()) ?
majidvp 2017/01/20 15:48:57 Done.
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698