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

Side by Side 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: Export CompositorAnimator Created 3 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "web/AnimationWorkletProxyClientImpl.h"
6
7 #include "core/dom/CompositorProxy.h"
8 #include "platform/graphics/CompositorAnimator.h"
9 #include "platform/graphics/CompositorMutableStateProvider.h"
10 #include "web/CompositorMutatorImpl.h"
11
12 namespace blink {
13
14 AnimationWorkletProxyClientImpl::AnimationWorkletProxyClientImpl(
15 CompositorMutatorImpl* mutator)
16 : m_mutator(mutator) {
17 DCHECK(isMainThread());
18 }
19
20 DEFINE_TRACE(AnimationWorkletProxyClientImpl) {
21 visitor->trace(m_proxies);
22 AnimationWorkletProxyClient::trace(visitor);
23 CompositorAnimator::trace(visitor);
24 }
25
26 bool AnimationWorkletProxyClientImpl::mutate(
27 double monotonicTimeNow,
28 CompositorMutableStateProvider* provider) {
29 DCHECK(!isMainThread());
30 // TODO(majidvp): actually call JS |animate| callbacks.
31
32 // Always request another rAF for now.
33 return true;
34 }
35
36 void AnimationWorkletProxyClientImpl::registerCompositorProxy(
37 CompositorProxy* proxy) {
38 DCHECK(!isMainThread());
39 m_proxies.add(proxy);
40 }
41
42 void AnimationWorkletProxyClientImpl::unregisterCompositorProxy(
43 CompositorProxy* proxy) {
44 DCHECK(!isMainThread());
45 m_proxies.remove(proxy);
46 }
47
48 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698