| Index: third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.cpp
|
| diff --git a/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp b/third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.cpp
|
| similarity index 35%
|
| copy from third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp
|
| copy to third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.cpp
|
| index ad97908ac77b22ea62f12101cdfe105f76286dbb..dc1c5bbc005889bc7e1403c506d006db32846937 100644
|
| --- a/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp
|
| +++ b/third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.cpp
|
| @@ -2,51 +2,51 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "modules/csspaint/WindowPaintWorklet.h"
|
| +#include "modules/compositorworker/WindowAnimationWorklet.h"
|
|
|
| #include "core/frame/LocalDOMWindow.h"
|
| #include "core/frame/LocalFrame.h"
|
| -#include "modules/csspaint/PaintWorklet.h"
|
| +#include "modules/compositorworker/AnimationWorklet.h"
|
|
|
| namespace blink {
|
|
|
| -WindowPaintWorklet::WindowPaintWorklet(LocalDOMWindow& window)
|
| +WindowAnimationWorklet::WindowAnimationWorklet(LocalDOMWindow& window)
|
| : DOMWindowProperty(window.frame())
|
| {
|
| }
|
|
|
| -const char* WindowPaintWorklet::supplementName()
|
| +const char* WindowAnimationWorklet::supplementName()
|
| {
|
| - return "WindowPaintWorklet";
|
| + return "WindowAnimationWorklet";
|
| }
|
|
|
| // static
|
| -WindowPaintWorklet& WindowPaintWorklet::from(LocalDOMWindow& window)
|
| +WindowAnimationWorklet& WindowAnimationWorklet::from(LocalDOMWindow& window)
|
| {
|
| - WindowPaintWorklet* supplement = static_cast<WindowPaintWorklet*>(Supplement<LocalDOMWindow>::from(window, supplementName()));
|
| + WindowAnimationWorklet* supplement = static_cast<WindowAnimationWorklet*>(Supplement<LocalDOMWindow>::from(window, supplementName()));
|
| if (!supplement) {
|
| - supplement = new WindowPaintWorklet(window);
|
| + supplement = new WindowAnimationWorklet(window);
|
| provideTo(window, supplementName(), supplement);
|
| }
|
| return *supplement;
|
| }
|
|
|
| // static
|
| -Worklet* WindowPaintWorklet::paintWorklet(ExecutionContext* executionContext, DOMWindow& window)
|
| +Worklet* WindowAnimationWorklet::animationWorklet(ExecutionContext* executionContext, DOMWindow& window)
|
| {
|
| - return from(toLocalDOMWindow(window)).paintWorklet(executionContext);
|
| + return from(toLocalDOMWindow(window)).animationWorklet(executionContext);
|
| }
|
|
|
| -PaintWorklet* WindowPaintWorklet::paintWorklet(ExecutionContext* executionContext) const
|
| +AnimationWorklet* WindowAnimationWorklet::animationWorklet(ExecutionContext* executionContext)
|
| {
|
| - if (!m_paintWorklet && frame())
|
| - m_paintWorklet = PaintWorklet::create(frame(), executionContext);
|
| - return m_paintWorklet.get();
|
| + if (!m_animationWorklet)
|
| + m_animationWorklet = AnimationWorklet::create(executionContext);
|
| + return m_animationWorklet.get();
|
| }
|
|
|
| -DEFINE_TRACE(WindowPaintWorklet)
|
| +DEFINE_TRACE(WindowAnimationWorklet)
|
| {
|
| - visitor->trace(m_paintWorklet);
|
| + visitor->trace(m_animationWorklet);
|
| Supplement<LocalDOMWindow>::trace(visitor);
|
| DOMWindowProperty::trace(visitor);
|
| }
|
|
|