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

Side by Side Diff: content/gpu/in_process_gpu_thread.h

Issue 1231263003: Share SyncPointManager between ipc and in-process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_ 5 #ifndef CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_
6 #define CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_ 6 #define CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_
7 7
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/common/in_process_child_thread_params.h" 10 #include "content/common/in_process_child_thread_params.h"
11 11
12 namespace gpu {
13 class SyncPointManager;
14 }
15
12 namespace content { 16 namespace content {
13 17
14 class GpuMemoryBufferFactory; 18 class GpuMemoryBufferFactory;
15 class GpuProcess; 19 class GpuProcess;
16 20
17 // This class creates a GPU thread (instead of a GPU process), when running 21 // This class creates a GPU thread (instead of a GPU process), when running
18 // with --in-process-gpu or --single-process. 22 // with --in-process-gpu or --single-process.
19 class InProcessGpuThread : public base::Thread { 23 class InProcessGpuThread : public base::Thread {
20 public: 24 public:
21 InProcessGpuThread(const InProcessChildThreadParams& params); 25 InProcessGpuThread(const InProcessChildThreadParams& params,
26 gpu::SyncPointManager* sync_point_manager_override);
22 ~InProcessGpuThread() override; 27 ~InProcessGpuThread() override;
23 28
24 protected: 29 protected:
25 void Init() override; 30 void Init() override;
26 void CleanUp() override; 31 void CleanUp() override;
27 32
28 private: 33 private:
29 InProcessChildThreadParams params_; 34 InProcessChildThreadParams params_;
30 35
31 // Deleted in CleanUp() on the gpu thread, so don't use smart pointers. 36 // Deleted in CleanUp() on the gpu thread, so don't use smart pointers.
32 GpuProcess* gpu_process_; 37 GpuProcess* gpu_process_;
33 38
39 // Non-owning.
40 gpu::SyncPointManager* sync_point_manager_override_;
41
34 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory_; 42 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory_;
35 43
36 DISALLOW_COPY_AND_ASSIGN(InProcessGpuThread); 44 DISALLOW_COPY_AND_ASSIGN(InProcessGpuThread);
37 }; 45 };
38 46
39 CONTENT_EXPORT base::Thread* CreateInProcessGpuThread( 47 CONTENT_EXPORT base::Thread* CreateInProcessGpuThread(
40 const InProcessChildThreadParams& params); 48 const InProcessChildThreadParams& params);
41 49
42 } // namespace content 50 } // namespace content
43 51
44 #endif // CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_ 52 #endif // CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698