Chromium Code Reviews| Index: third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp |
| diff --git a/third_party/WebKit/Source/modules/csspaint/PaintWorklet.cpp b/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp |
| similarity index 30% |
| copy from third_party/WebKit/Source/modules/csspaint/PaintWorklet.cpp |
| copy to third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp |
| index 323e79afff5f16ca42e50dc09d8f0ec0483a5b7f..46a51c43a37e1f3b457f4d05f83add231d88dc7f 100644 |
| --- a/third_party/WebKit/Source/modules/csspaint/PaintWorklet.cpp |
| +++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp |
| @@ -2,50 +2,39 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "modules/csspaint/PaintWorklet.h" |
| +#include "modules/compositorworker/AnimationWorklet.h" |
| #include "bindings/core/v8/V8Binding.h" |
| #include "core/dom/ExecutionContext.h" |
| -#include "modules/csspaint/PaintWorkletGlobalScope.h" |
| +#include "modules/worklet/ThreadedWorkletGlobalScopeProxy.h" |
| namespace blink { |
| // static |
| -PaintWorklet* PaintWorklet::create(LocalFrame* frame, ExecutionContext* executionContext) |
| +AnimationWorklet* AnimationWorklet::create(LocalFrame* frame, ExecutionContext* executionContext) |
| { |
| - PaintWorklet* worklet = new PaintWorklet(frame, executionContext); |
| + AnimationWorklet* worklet = new AnimationWorklet(frame, executionContext); |
| worklet->suspendIfNeeded(); |
| return worklet; |
| } |
| -PaintWorklet::PaintWorklet(LocalFrame* frame, ExecutionContext* executionContext) |
| +AnimationWorklet::AnimationWorklet(LocalFrame* frame, ExecutionContext* executionContext) |
|
nhiroki
2016/07/28 06:13:53
|frame| is not necessary?
ikilpatrick
2016/07/28 20:57:04
Done.
|
| : Worklet(executionContext) |
| - , m_paintWorkletGlobalScope(PaintWorkletGlobalScope::create(frame, executionContext->url(), executionContext->userAgent(), executionContext->getSecurityOrigin(), toIsolate(executionContext))) |
| + , m_workletGlobalScopeProxy(new ThreadedWorkletGlobalScopeProxy()) |
| { |
| } |
| -PaintWorklet::~PaintWorklet() |
| +AnimationWorklet::~AnimationWorklet() |
| { |
| } |
| -PaintWorkletGlobalScope* PaintWorklet::workletGlobalScopeProxy() const |
| +ThreadedWorkletGlobalScopeProxy* AnimationWorklet::workletGlobalScopeProxy() const |
| { |
| - return m_paintWorkletGlobalScope.get(); |
| + return m_workletGlobalScopeProxy.get(); |
| } |
| -CSSPaintDefinition* PaintWorklet::findDefinition(const String& name) |
| +DEFINE_TRACE(AnimationWorklet) |
| { |
| - return m_paintWorkletGlobalScope->findDefinition(name); |
| -} |
| - |
| -void PaintWorklet::addPendingGenerator(const String& name, CSSPaintImageGeneratorImpl* generator) |
| -{ |
| - return m_paintWorkletGlobalScope->addPendingGenerator(name, generator); |
| -} |
| - |
| -DEFINE_TRACE(PaintWorklet) |
| -{ |
| - visitor->trace(m_paintWorkletGlobalScope); |
| Worklet::trace(visitor); |
| } |