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

Side by Side Diff: Source/modules/compositorworker/CompositorWorkerManager.h

Issue 1315743003: [part 1] Make classes and structures in modules/ fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 CompositorWorkerManager_h 5 #ifndef CompositorWorkerManager_h
6 #define CompositorWorkerManager_h 6 #define CompositorWorkerManager_h
7 7
8 #include "modules/ModulesExport.h" 8 #include "modules/ModulesExport.h"
9 #include "wtf/OwnPtr.h" 9 #include "wtf/OwnPtr.h"
10 #include "wtf/PassOwnPtr.h" 10 #include "wtf/PassOwnPtr.h"
11 #include "wtf/ThreadingPrimitives.h" 11 #include "wtf/ThreadingPrimitives.h"
12 #include <v8.h> 12 #include <v8.h>
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class V8IsolateInterruptor; 16 class V8IsolateInterruptor;
17 class WebThread; 17 class WebThread;
18 class WebThreadSupportingGC; 18 class WebThreadSupportingGC;
19 19
20 class MODULES_EXPORT CompositorWorkerManager final { 20 class MODULES_EXPORT CompositorWorkerManager final {
21 WTF_MAKE_FAST_ALLOCATED(CompositorWorkerManager);
21 public: 22 public:
22 static void initialize(); 23 static void initialize();
23 static void shutdown(); 24 static void shutdown();
24 25
25 static CompositorWorkerManager* instance(); 26 static CompositorWorkerManager* instance();
26 27
27 // Returns the thread used for compositor workers. This creates a new thread if a 28 // Returns the thread used for compositor workers. This creates a new thread if a
28 // thread doesn't already exist. 29 // thread doesn't already exist.
29 WebThreadSupportingGC& compositorWorkerThread(); 30 WebThreadSupportingGC& compositorWorkerThread();
30 31
(...skipping 17 matching lines...) Expand all
48 Mutex m_mutex; 49 Mutex m_mutex;
49 OwnPtr<WebThreadSupportingGC> m_thread; 50 OwnPtr<WebThreadSupportingGC> m_thread;
50 OwnPtr<WebThread> m_platformThread; 51 OwnPtr<WebThread> m_platformThread;
51 int m_workerCount = 0; 52 int m_workerCount = 0;
52 v8::Isolate* m_isolate = nullptr; 53 v8::Isolate* m_isolate = nullptr;
53 }; 54 };
54 55
55 } // namespace blink 56 } // namespace blink
56 57
57 #endif // CompositorWorkerManager_h 58 #endif // CompositorWorkerManager_h
OLDNEW
« no previous file with comments | « Source/modules/canvas2d/TouchHitRegion.h ('k') | Source/modules/compositorworker/CompositorWorkerMessagingProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698