Chromium Code Reviews| Index: third_party/WebKit/Source/modules/compositorworker/AbstractCompositorWorkerThread.cpp |
| diff --git a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp b/third_party/WebKit/Source/modules/compositorworker/AbstractCompositorWorkerThread.cpp |
| similarity index 63% |
| copy from third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp |
| copy to third_party/WebKit/Source/modules/compositorworker/AbstractCompositorWorkerThread.cpp |
| index dcf5b793bd79f16f47288c750fe5285096f224bd..31441ab8a876ad63e537e694549cecfddf78ebc4 100644 |
| --- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp |
| +++ b/third_party/WebKit/Source/modules/compositorworker/AbstractCompositorWorkerThread.cpp |
| @@ -1,15 +1,10 @@ |
| -// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// 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 "modules/compositorworker/CompositorWorkerThread.h" |
| +#include "modules/compositorworker/AbstractCompositorWorkerThread.h" |
| -#include "bindings/core/v8/V8GCController.h" |
| -#include "bindings/core/v8/V8Initializer.h" |
| -#include "core/workers/InProcessWorkerObjectProxy.h" |
| #include "core/workers/WorkerBackingThread.h" |
| -#include "core/workers/WorkerThreadStartupData.h" |
| -#include "modules/compositorworker/CompositorWorkerGlobalScope.h" |
| #include "platform/CrossThreadFunctional.h" |
| #include "platform/TraceEvent.h" |
| #include "platform/WaitableEvent.h" |
|
majidvp
2016/08/08 12:46:48
CrossThreadFunctional, TraceEvent and WaitanleEven
ikilpatrick
2016/08/08 13:54:58
Removed TraceEvent, CrossThreadFunctional used for
majidvp
2016/08/08 14:43:06
Acknowledged.
|
| @@ -107,53 +102,33 @@ BackingThreadHolder* BackingThreadHolder::s_instance = nullptr; |
| } // namespace |
| -std::unique_ptr<CompositorWorkerThread> CompositorWorkerThread::create(PassRefPtr<WorkerLoaderProxy> workerLoaderProxy, InProcessWorkerObjectProxy& workerObjectProxy, double timeOrigin) |
| +AbstractCompositorWorkerThread::AbstractCompositorWorkerThread(PassRefPtr<WorkerLoaderProxy> workerLoaderProxy, WorkerReportingProxy& workerReportingProxy) |
| + : WorkerThread(workerLoaderProxy, workerReportingProxy) |
| { |
| - TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), "CompositorWorkerThread::create"); |
| - ASSERT(isMainThread()); |
| - return wrapUnique(new CompositorWorkerThread(workerLoaderProxy, workerObjectProxy, timeOrigin)); |
| } |
| -CompositorWorkerThread::CompositorWorkerThread(PassRefPtr<WorkerLoaderProxy> workerLoaderProxy, InProcessWorkerObjectProxy& workerObjectProxy, double timeOrigin) |
| - : WorkerThread(workerLoaderProxy, workerObjectProxy) |
| - , m_workerObjectProxy(workerObjectProxy) |
| - , m_timeOrigin(timeOrigin) |
| +AbstractCompositorWorkerThread::~AbstractCompositorWorkerThread() |
| { |
| } |
| -CompositorWorkerThread::~CompositorWorkerThread() |
| -{ |
| -} |
| - |
| -WorkerBackingThread& CompositorWorkerThread::workerBackingThread() |
| +WorkerBackingThread& AbstractCompositorWorkerThread::workerBackingThread() |
| { |
| return *BackingThreadHolder::instance().thread(); |
| } |
| -WorkerOrWorkletGlobalScope* CompositorWorkerThread::createWorkerGlobalScope(std::unique_ptr<WorkerThreadStartupData> startupData) |
| -{ |
| - TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), "CompositorWorkerThread::createWorkerGlobalScope"); |
| - return CompositorWorkerGlobalScope::create(this, std::move(startupData), m_timeOrigin); |
| -} |
| - |
| -ConsoleMessageStorage* CompositorWorkerThread::consoleMessageStorage() |
| -{ |
| - return toWorkerGlobalScope(globalScope())->consoleMessageStorage(); |
| -} |
| - |
| -void CompositorWorkerThread::ensureSharedBackingThread() |
| +void AbstractCompositorWorkerThread::ensureSharedBackingThread() |
| { |
| DCHECK(isMainThread()); |
| BackingThreadHolder::ensureInstance(); |
| } |
| -void CompositorWorkerThread::clearSharedBackingThread() |
| +void AbstractCompositorWorkerThread::clearSharedBackingThread() |
| { |
| DCHECK(isMainThread()); |
| BackingThreadHolder::clear(); |
| } |
| -void CompositorWorkerThread::createSharedBackingThreadForTest() |
| +void AbstractCompositorWorkerThread::createSharedBackingThreadForTest() |
| { |
| BackingThreadHolder::createForTest(); |
| } |