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

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

Issue 1845563005: Refactor content/common/gpu into gpu/ipc/service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drop ref to deleted content_tests_gypi_values.content_unittests_ozone_sources Created 4 years, 8 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
« no previous file with comments | « content/gpu/gpu_watchdog_thread.h ('k') | content/gpu/in_process_gpu_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/common/in_process_child_thread_params.h" 12 #include "content/common/in_process_child_thread_params.h"
13 #include "gpu/command_buffer/service/gpu_preferences.h" 13 #include "gpu/command_buffer/service/gpu_preferences.h"
14 14
15 namespace gpu { 15 namespace gpu {
16 class GpuMemoryBufferFactory;
17 class SyncPointManager;
16 struct GpuPreferences; 18 struct GpuPreferences;
17 class SyncPointManager;
18 } 19 }
19 20
20 namespace content { 21 namespace content {
21 22
22 class GpuMemoryBufferFactory;
23 class GpuProcess; 23 class GpuProcess;
24 24
25 // This class creates a GPU thread (instead of a GPU process), when running 25 // This class creates a GPU thread (instead of a GPU process), when running
26 // with --in-process-gpu or --single-process. 26 // with --in-process-gpu or --single-process.
27 class InProcessGpuThread : public base::Thread { 27 class InProcessGpuThread : public base::Thread {
28 public: 28 public:
29 InProcessGpuThread(const InProcessChildThreadParams& params, 29 InProcessGpuThread(const InProcessChildThreadParams& params,
30 const gpu::GpuPreferences& gpu_preferences, 30 const gpu::GpuPreferences& gpu_preferences,
31 gpu::SyncPointManager* sync_point_manager_override); 31 gpu::SyncPointManager* sync_point_manager_override);
32 ~InProcessGpuThread() override; 32 ~InProcessGpuThread() override;
33 33
34 protected: 34 protected:
35 void Init() override; 35 void Init() override;
36 void CleanUp() override; 36 void CleanUp() override;
37 37
38 private: 38 private:
39 InProcessChildThreadParams params_; 39 InProcessChildThreadParams params_;
40 40
41 // Deleted in CleanUp() on the gpu thread, so don't use smart pointers. 41 // Deleted in CleanUp() on the gpu thread, so don't use smart pointers.
42 GpuProcess* gpu_process_; 42 GpuProcess* gpu_process_;
43 43
44 const gpu::GpuPreferences gpu_preferences_; 44 const gpu::GpuPreferences gpu_preferences_;
45 45
46 // Can be null if overridden. 46 // Can be null if overridden.
47 scoped_ptr<gpu::SyncPointManager> sync_point_manager_; 47 scoped_ptr<gpu::SyncPointManager> sync_point_manager_;
48 48
49 // Non-owning. 49 // Non-owning.
50 gpu::SyncPointManager* sync_point_manager_override_; 50 gpu::SyncPointManager* sync_point_manager_override_;
51 51
52 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory_; 52 scoped_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory_;
53 53
54 DISALLOW_COPY_AND_ASSIGN(InProcessGpuThread); 54 DISALLOW_COPY_AND_ASSIGN(InProcessGpuThread);
55 }; 55 };
56 56
57 CONTENT_EXPORT base::Thread* CreateInProcessGpuThread( 57 CONTENT_EXPORT base::Thread* CreateInProcessGpuThread(
58 const InProcessChildThreadParams& params, 58 const InProcessChildThreadParams& params,
59 const gpu::GpuPreferences& gpu_preferences); 59 const gpu::GpuPreferences& gpu_preferences);
60 60
61 } // namespace content 61 } // namespace content
62 62
63 #endif // CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_ 63 #endif // CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_
OLDNEW
« no previous file with comments | « content/gpu/gpu_watchdog_thread.h ('k') | content/gpu/in_process_gpu_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698