| OLD | NEW |
| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 { |
| 100 return preempted_flag_; | 100 return preempted_flag_; |
| 101 } | 101 } |
| 102 | 102 |
| 103 const std::string& channel_id() const { return channel_id_; } | |
| 104 | |
| 105 virtual base::ProcessId GetClientPID() const; | 103 virtual base::ProcessId GetClientPID() const; |
| 106 | 104 |
| 107 int client_id() const { return client_id_; } | 105 int client_id() const { return client_id_; } |
| 108 | 106 |
| 109 uint64_t client_tracing_id() const { return client_tracing_id_; } | 107 uint64_t client_tracing_id() const { return client_tracing_id_; } |
| 110 | 108 |
| 111 base::WeakPtr<GpuChannel> AsWeakPtr(); | 109 base::WeakPtr<GpuChannel> AsWeakPtr(); |
| 112 | 110 |
| 113 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner() const { | 111 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner() const { |
| 114 return io_task_runner_; | 112 return io_task_runner_; |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 GpuChannelManager* const gpu_channel_manager_; | 225 GpuChannelManager* const gpu_channel_manager_; |
| 228 | 226 |
| 229 // Sync point manager. Outlives the channel and is guaranteed to outlive the | 227 // Sync point manager. Outlives the channel and is guaranteed to outlive the |
| 230 // message loop. | 228 // message loop. |
| 231 SyncPointManager* const sync_point_manager_; | 229 SyncPointManager* const sync_point_manager_; |
| 232 | 230 |
| 233 std::unique_ptr<IPC::SyncChannel> channel_; | 231 std::unique_ptr<IPC::SyncChannel> channel_; |
| 234 | 232 |
| 235 IPC::Listener* unhandled_message_listener_; | 233 IPC::Listener* unhandled_message_listener_; |
| 236 | 234 |
| 237 // Uniquely identifies the channel within this GPU process. | |
| 238 std::string channel_id_; | |
| 239 | |
| 240 // Used to implement message routing functionality to CommandBuffer objects | 235 // Used to implement message routing functionality to CommandBuffer objects |
| 241 IPC::MessageRouter router_; | 236 IPC::MessageRouter router_; |
| 242 | 237 |
| 243 // Whether the processing of IPCs on this channel is stalled and we should | 238 // Whether the processing of IPCs on this channel is stalled and we should |
| 244 // preempt other GpuChannels. | 239 // preempt other GpuChannels. |
| 245 scoped_refptr<PreemptionFlag> preempting_flag_; | 240 scoped_refptr<PreemptionFlag> preempting_flag_; |
| 246 | 241 |
| 247 // If non-NULL, all stubs on this channel should stop processing GL | 242 // If non-NULL, all stubs on this channel should stop processing GL |
| 248 // commands (via their CommandExecutor) when preempted_flag_->IsSet() | 243 // commands (via their CommandExecutor) when preempted_flag_->IsSet() |
| 249 scoped_refptr<PreemptionFlag> preempted_flag_; | 244 scoped_refptr<PreemptionFlag> preempted_flag_; |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 scoped_refptr<PreemptionFlag> preempting_flag_; | 468 scoped_refptr<PreemptionFlag> preempting_flag_; |
| 474 scoped_refptr<PreemptionFlag> preempted_flag_; | 469 scoped_refptr<PreemptionFlag> preempted_flag_; |
| 475 SyncPointManager* const sync_point_manager_; | 470 SyncPointManager* const sync_point_manager_; |
| 476 | 471 |
| 477 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue); | 472 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue); |
| 478 }; | 473 }; |
| 479 | 474 |
| 480 } // namespace gpu | 475 } // namespace gpu |
| 481 | 476 |
| 482 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_H_ | 477 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_H_ |
| OLD | NEW |