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

Side by Side Diff: gpu/ipc/service/gpu_channel.h

Issue 2286063003: gpu: Move GpuWatchdogThread into //gpu/ipc/service from content. (Closed)
Patch Set: tot merge Created 4 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
« no previous file with comments | « gpu/ipc/service/BUILD.gn ('k') | gpu/ipc/service/gpu_channel.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 GPU_IPC_SERVICE_GPU_CHANNEL_H_ 5 #ifndef GPU_IPC_SERVICE_GPU_CHANNEL_H_
6 #define GPU_IPC_SERVICE_GPU_CHANNEL_H_ 6 #define GPU_IPC_SERVICE_GPU_CHANNEL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 namespace gpu { 44 namespace gpu {
45 45
46 class PreemptionFlag; 46 class PreemptionFlag;
47 class SyncPointOrderData; 47 class SyncPointOrderData;
48 class SyncPointManager; 48 class SyncPointManager;
49 class GpuChannelManager; 49 class GpuChannelManager;
50 class GpuChannelMessageFilter; 50 class GpuChannelMessageFilter;
51 class GpuChannelMessageQueue; 51 class GpuChannelMessageQueue;
52 class GpuWatchdog; 52 class GpuWatchdogThread;
53 53
54 // Encapsulates an IPC channel between the GPU process and one renderer 54 // Encapsulates an IPC channel between the GPU process and one renderer
55 // process. On the renderer side there's a corresponding GpuChannelHost. 55 // process. On the renderer side there's a corresponding GpuChannelHost.
56 class GPU_EXPORT GpuChannel 56 class GPU_EXPORT GpuChannel
57 : public IPC::Listener, 57 : public IPC::Listener,
58 public IPC::Sender { 58 public IPC::Sender {
59 public: 59 public:
60 // Takes ownership of the renderer process handle. 60 // Takes ownership of the renderer process handle.
61 GpuChannel(GpuChannelManager* gpu_channel_manager, 61 GpuChannel(GpuChannelManager* gpu_channel_manager,
62 SyncPointManager* sync_point_manager, 62 SyncPointManager* sync_point_manager,
63 GpuWatchdog* watchdog, 63 GpuWatchdogThread* watchdog,
64 gl::GLShareGroup* share_group, 64 gl::GLShareGroup* share_group,
65 gles2::MailboxManager* mailbox_manager, 65 gles2::MailboxManager* mailbox_manager,
66 PreemptionFlag* preempting_flag, 66 PreemptionFlag* preempting_flag,
67 PreemptionFlag* preempted_flag, 67 PreemptionFlag* preempted_flag,
68 base::SingleThreadTaskRunner* task_runner, 68 base::SingleThreadTaskRunner* task_runner,
69 base::SingleThreadTaskRunner* io_task_runner, 69 base::SingleThreadTaskRunner* io_task_runner,
70 int32_t client_id, 70 int32_t client_id,
71 uint64_t client_tracing_id, 71 uint64_t client_tracing_id,
72 bool allow_view_command_buffers, 72 bool allow_view_command_buffers,
73 bool allow_real_time_streams); 73 bool allow_real_time_streams);
74 ~GpuChannel() override; 74 ~GpuChannel() override;
75 75
76 // Initializes the IPC channel. Caller takes ownership of the client FD in 76 // Initializes the IPC channel. Caller takes ownership of the client FD in
77 // the returned handle and is responsible for closing it. 77 // the returned handle and is responsible for closing it.
78 virtual IPC::ChannelHandle Init(base::WaitableEvent* shutdown_event); 78 virtual IPC::ChannelHandle Init(base::WaitableEvent* shutdown_event);
79 79
80 void SetUnhandledMessageListener(IPC::Listener* listener); 80 void SetUnhandledMessageListener(IPC::Listener* listener);
81 81
82 // Get the GpuChannelManager that owns this channel. 82 // Get the GpuChannelManager that owns this channel.
83 GpuChannelManager* gpu_channel_manager() const { 83 GpuChannelManager* gpu_channel_manager() const {
84 return gpu_channel_manager_; 84 return gpu_channel_manager_;
85 } 85 }
86 86
87 SyncPointManager* sync_point_manager() const { return sync_point_manager_; } 87 SyncPointManager* sync_point_manager() const { return sync_point_manager_; }
88 88
89 GpuWatchdog* watchdog() const { return watchdog_; } 89 GpuWatchdogThread* watchdog() const { return watchdog_; }
90 90
91 const scoped_refptr<gles2::MailboxManager>& mailbox_manager() const { 91 const scoped_refptr<gles2::MailboxManager>& mailbox_manager() const {
92 return mailbox_manager_; 92 return mailbox_manager_;
93 } 93 }
94 94
95 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner() const { 95 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner() const {
96 return task_runner_; 96 return task_runner_;
97 } 97 }
98 98
99 const scoped_refptr<PreemptionFlag>& preempted_flag() const { 99 const scoped_refptr<PreemptionFlag>& preempted_flag() const {
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 // The task runners for the main thread and the io thread. 257 // The task runners for the main thread and the io thread.
258 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 258 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
259 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; 259 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
260 260
261 // The share group that all contexts associated with a particular renderer 261 // The share group that all contexts associated with a particular renderer
262 // process use. 262 // process use.
263 scoped_refptr<gl::GLShareGroup> share_group_; 263 scoped_refptr<gl::GLShareGroup> share_group_;
264 264
265 scoped_refptr<gles2::MailboxManager> mailbox_manager_; 265 scoped_refptr<gles2::MailboxManager> mailbox_manager_;
266 266
267 GpuWatchdog* const watchdog_; 267 GpuWatchdogThread* const watchdog_;
268 268
269 // Map of stream id to appropriate message queue. 269 // Map of stream id to appropriate message queue.
270 base::hash_map<int32_t, scoped_refptr<GpuChannelMessageQueue>> streams_; 270 base::hash_map<int32_t, scoped_refptr<GpuChannelMessageQueue>> streams_;
271 271
272 // Multimap of stream id to route ids. 272 // Multimap of stream id to route ids.
273 base::hash_map<int32_t, int> streams_to_num_routes_; 273 base::hash_map<int32_t, int> streams_to_num_routes_;
274 274
275 // Map of route id to stream id; 275 // Map of route id to stream id;
276 base::hash_map<int32_t, int32_t> routes_to_streams_; 276 base::hash_map<int32_t, int32_t> routes_to_streams_;
277 277
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 scoped_refptr<PreemptionFlag> preempting_flag_; 473 scoped_refptr<PreemptionFlag> preempting_flag_;
474 scoped_refptr<PreemptionFlag> preempted_flag_; 474 scoped_refptr<PreemptionFlag> preempted_flag_;
475 SyncPointManager* const sync_point_manager_; 475 SyncPointManager* const sync_point_manager_;
476 476
477 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue); 477 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue);
478 }; 478 };
479 479
480 } // namespace gpu 480 } // namespace gpu
481 481
482 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_H_ 482 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_H_
OLDNEW
« no previous file with comments | « gpu/ipc/service/BUILD.gn ('k') | gpu/ipc/service/gpu_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698