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

Side by Side Diff: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.h

Issue 1955693003: compositor-worker: Keep worker backing thread alive for the lifetime of the compositor thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call TerminateExecution manually, check threads, etc. Created 4 years, 7 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
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 #ifndef CompositorWorkerThread_h 5 #ifndef CompositorWorkerThread_h
6 #define CompositorWorkerThread_h 6 #define CompositorWorkerThread_h
7 7
8 #include "core/workers/WorkerThread.h" 8 #include "core/workers/WorkerThread.h"
9 #include "modules/ModulesExport.h" 9 #include "modules/ModulesExport.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class InProcessWorkerObjectProxy; 13 class InProcessWorkerObjectProxy;
14 14
15 // This class is overridden in unit-tests. 15 // This class is overridden in unit-tests.
16 class MODULES_EXPORT CompositorWorkerThread final : public WorkerThread { 16 class MODULES_EXPORT CompositorWorkerThread final : public WorkerThread {
17 public: 17 public:
18 static PassOwnPtr<CompositorWorkerThread> create(PassRefPtr<WorkerLoaderProx y>, InProcessWorkerObjectProxy&, double timeOrigin); 18 static PassOwnPtr<CompositorWorkerThread> create(PassRefPtr<WorkerLoaderProx y>, InProcessWorkerObjectProxy&, double timeOrigin);
19 ~CompositorWorkerThread() override; 19 ~CompositorWorkerThread() override;
20 20
21 InProcessWorkerObjectProxy& workerObjectProxy() const { return m_workerObjec tProxy; } 21 InProcessWorkerObjectProxy& workerObjectProxy() const { return m_workerObjec tProxy; }
22 WorkerBackingThread& workerBackingThread() override; 22 WorkerBackingThread& workerBackingThread() override;
23 bool shouldAttachThreadDebugger() const override { return false; } 23 bool shouldAttachThreadDebugger() const override { return false; }
24 24
25 static void resetSharedBackingThreadForTest(); 25 static void ensureSharedBackingThread();
26 static void createSharedBackingThreadForTest();
27 static void clearSharedBackingThread();
26 28
27 protected: 29 protected:
28 CompositorWorkerThread(PassRefPtr<WorkerLoaderProxy>, InProcessWorkerObjectP roxy&, double timeOrigin); 30 CompositorWorkerThread(PassRefPtr<WorkerLoaderProxy>, InProcessWorkerObjectP roxy&, double timeOrigin);
29 31
30 WorkerGlobalScope* createWorkerGlobalScope(PassOwnPtr<WorkerThreadStartupDat a>) override; 32 WorkerGlobalScope* createWorkerGlobalScope(PassOwnPtr<WorkerThreadStartupDat a>) override;
31 33
32 private: 34 private:
33 InProcessWorkerObjectProxy& m_workerObjectProxy; 35 InProcessWorkerObjectProxy& m_workerObjectProxy;
34 double m_timeOrigin; 36 double m_timeOrigin;
35 }; 37 };
36 38
37 } // namespace blink 39 } // namespace blink
38 40
39 #endif // CompositorWorkerThread_h 41 #endif // CompositorWorkerThread_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698