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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 uint64_t client_tracing_id() const { return client_tracing_id_; } | 107 uint64_t client_tracing_id() const { return client_tracing_id_; } |
108 | 108 |
109 base::WeakPtr<GpuChannel> AsWeakPtr(); | 109 base::WeakPtr<GpuChannel> AsWeakPtr(); |
110 | 110 |
111 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner() const { | 111 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner() const { |
112 return io_task_runner_; | 112 return io_task_runner_; |
113 } | 113 } |
114 | 114 |
115 // IPC::Listener implementation: | 115 // IPC::Listener implementation: |
116 bool OnMessageReceived(const IPC::Message& msg) override; | 116 bool OnMessageReceived(const IPC::Message& msg) override; |
| 117 void OnChannelConnected(int32_t peer_pid) override; |
117 void OnChannelError() override; | 118 void OnChannelError() override; |
118 | 119 |
119 // IPC::Sender implementation: | 120 // IPC::Sender implementation: |
120 bool Send(IPC::Message* msg) override; | 121 bool Send(IPC::Message* msg) override; |
121 | 122 |
122 void OnStreamRescheduled(int32_t stream_id, bool scheduled); | 123 void OnStreamRescheduled(int32_t stream_id, bool scheduled); |
123 | 124 |
124 gl::GLShareGroup* share_group() const { return share_group_.get(); } | 125 gl::GLShareGroup* share_group() const { return share_group_.get(); } |
125 | 126 |
126 GpuCommandBufferStub* LookupCommandBuffer(int32_t route_id); | 127 GpuCommandBufferStub* LookupCommandBuffer(int32_t route_id); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 270 |
270 // Map of route id to stream id; | 271 // Map of route id to stream id; |
271 base::hash_map<int32_t, int32_t> routes_to_streams_; | 272 base::hash_map<int32_t, int32_t> routes_to_streams_; |
272 | 273 |
273 // Can view command buffers be created on this channel. | 274 // Can view command buffers be created on this channel. |
274 const bool allow_view_command_buffers_; | 275 const bool allow_view_command_buffers_; |
275 | 276 |
276 // Can real time streams be created on this channel. | 277 // Can real time streams be created on this channel. |
277 const bool allow_real_time_streams_; | 278 const bool allow_real_time_streams_; |
278 | 279 |
| 280 base::ProcessId peer_pid_; |
| 281 |
279 // Member variables should appear before the WeakPtrFactory, to ensure | 282 // Member variables should appear before the WeakPtrFactory, to ensure |
280 // that any WeakPtrs to Controller are invalidated before its members | 283 // that any WeakPtrs to Controller are invalidated before its members |
281 // variable's destructors are executed, rendering them invalid. | 284 // variable's destructors are executed, rendering them invalid. |
282 base::WeakPtrFactory<GpuChannel> weak_factory_; | 285 base::WeakPtrFactory<GpuChannel> weak_factory_; |
283 | 286 |
284 DISALLOW_COPY_AND_ASSIGN(GpuChannel); | 287 DISALLOW_COPY_AND_ASSIGN(GpuChannel); |
285 }; | 288 }; |
286 | 289 |
287 // This filter does three things: | 290 // This filter does three things: |
288 // - it counts and timestamps each message forwarded to the channel | 291 // - it counts and timestamps each message forwarded to the channel |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 scoped_refptr<PreemptionFlag> preempting_flag_; | 471 scoped_refptr<PreemptionFlag> preempting_flag_; |
469 scoped_refptr<PreemptionFlag> preempted_flag_; | 472 scoped_refptr<PreemptionFlag> preempted_flag_; |
470 SyncPointManager* const sync_point_manager_; | 473 SyncPointManager* const sync_point_manager_; |
471 | 474 |
472 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue); | 475 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue); |
473 }; | 476 }; |
474 | 477 |
475 } // namespace gpu | 478 } // namespace gpu |
476 | 479 |
477 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_H_ | 480 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_H_ |
OLD | NEW |