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

Side by Side Diff: third_party/WebKit/Source/core/dom/CompositorProxy.cpp

Issue 2515363002: Introduce AnimationWorkletProxyClient and necessary plumbing to get it in worklet messaging proxy. (Closed)
Patch Set: address feedback Created 4 years 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/dom/CompositorProxy.h" 5 #include "core/dom/CompositorProxy.h"
6 6
7 #include "bindings/core/v8/ExceptionMessages.h" 7 #include "bindings/core/v8/ExceptionMessages.h"
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "core/dom/CompositorWorkerProxyClient.h"
9 #include "core/dom/DOMNodeIds.h" 10 #include "core/dom/DOMNodeIds.h"
10 #include "core/dom/ExceptionCode.h" 11 #include "core/dom/ExceptionCode.h"
11 #include "core/dom/ExecutionContext.h" 12 #include "core/dom/ExecutionContext.h"
12 #include "core/workers/WorkerClients.h" 13 #include "core/workers/WorkerClients.h"
13 #include "core/workers/WorkerGlobalScope.h" 14 #include "core/workers/WorkerGlobalScope.h"
14 #include "platform/CrossThreadFunctional.h" 15 #include "platform/CrossThreadFunctional.h"
15 #include "platform/graphics/CompositorMutableProperties.h" 16 #include "platform/graphics/CompositorMutableProperties.h"
16 #include "public/platform/Platform.h" 17 #include "public/platform/Platform.h"
17 #include "public/platform/WebTraceLocation.h" 18 #include "public/platform/WebTraceLocation.h"
18 #include <algorithm> 19 #include <algorithm>
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 119
119 return new CompositorProxy(*element, attributeArray); 120 return new CompositorProxy(*element, attributeArray);
120 } 121 }
121 122
122 CompositorProxy* CompositorProxy::create(ExecutionContext* context, 123 CompositorProxy* CompositorProxy::create(ExecutionContext* context,
123 uint64_t elementId, 124 uint64_t elementId,
124 uint32_t compositorMutableProperties) { 125 uint32_t compositorMutableProperties) {
125 if (context->isCompositorWorkerGlobalScope()) { 126 if (context->isCompositorWorkerGlobalScope()) {
126 WorkerClients* clients = toWorkerGlobalScope(context)->clients(); 127 WorkerClients* clients = toWorkerGlobalScope(context)->clients();
127 DCHECK(clients); 128 DCHECK(clients);
128 CompositorProxyClient* client = CompositorProxyClient::from(clients); 129 CompositorWorkerProxyClient* client =
130 CompositorWorkerProxyClient::from(clients);
129 return new CompositorProxy(elementId, compositorMutableProperties, client); 131 return new CompositorProxy(elementId, compositorMutableProperties, client);
130 } 132 }
131 133
132 return new CompositorProxy(elementId, compositorMutableProperties); 134 return new CompositorProxy(elementId, compositorMutableProperties);
133 } 135 }
134 136
135 CompositorProxy::CompositorProxy(uint64_t elementId, 137 CompositorProxy::CompositorProxy(uint64_t elementId,
136 uint32_t compositorMutableProperties) 138 uint32_t compositorMutableProperties)
137 : m_elementId(elementId), 139 : m_elementId(elementId),
138 m_compositorMutableProperties(compositorMutableProperties), 140 m_compositorMutableProperties(compositorMutableProperties),
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 m_elementId, m_compositorMutableProperties); 301 m_elementId, m_compositorMutableProperties);
300 } else { 302 } else {
301 Platform::current()->mainThread()->getWebTaskRunner()->postTask( 303 Platform::current()->mainThread()->getWebTaskRunner()->postTask(
302 BLINK_FROM_HERE, 304 BLINK_FROM_HERE,
303 crossThreadBind(&decrementCompositorProxiedPropertiesForElement, 305 crossThreadBind(&decrementCompositorProxiedPropertiesForElement,
304 m_elementId, m_compositorMutableProperties)); 306 m_elementId, m_compositorMutableProperties));
305 } 307 }
306 } 308 }
307 309
308 } // namespace blink 310 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698