| 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 CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
| 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 namespace base { | 30 namespace base { |
| 31 class MessageLoopProxy; | 31 class MessageLoopProxy; |
| 32 class WaitableEvent; | 32 class WaitableEvent; |
| 33 } | 33 } |
| 34 | 34 |
| 35 namespace gpu { | 35 namespace gpu { |
| 36 class PreemptionFlag; | 36 class PreemptionFlag; |
| 37 union ValueState; | 37 union ValueState; |
| 38 class ValueStateMap; | 38 class ValueStateMap; |
| 39 namespace gles2 { | 39 namespace gles2 { |
| 40 class SubscriptionRefSet; |
| 40 } | 41 } |
| 41 } | 42 } |
| 42 | 43 |
| 43 namespace IPC { | 44 namespace IPC { |
| 44 class MessageFilter; | 45 class MessageFilter; |
| 45 } | 46 } |
| 46 | 47 |
| 47 namespace content { | 48 namespace content { |
| 48 class DevToolsGpuAgent; | 49 class DevToolsGpuAgent; |
| 49 class GpuChannelManager; | 50 class GpuChannelManager; |
| 50 class GpuChannelMessageFilter; | 51 class GpuChannelMessageFilter; |
| 51 class GpuWatchdog; | 52 class GpuWatchdog; |
| 52 | 53 |
| 53 // Encapsulates an IPC channel between the GPU process and one renderer | 54 // Encapsulates an IPC channel between the GPU process and one renderer |
| 54 // process. On the renderer side there's a corresponding GpuChannelHost. | 55 // process. On the renderer side there's a corresponding GpuChannelHost. |
| 55 class GpuChannel : public IPC::Listener, public IPC::Sender { | 56 class GpuChannel : public IPC::Listener, public IPC::Sender { |
| 56 public: | 57 public: |
| 57 // Takes ownership of the renderer process handle. | 58 // Takes ownership of the renderer process handle. |
| 58 GpuChannel(GpuChannelManager* gpu_channel_manager, | 59 GpuChannel(GpuChannelManager* gpu_channel_manager, |
| 59 GpuWatchdog* watchdog, | 60 GpuWatchdog* watchdog, |
| 60 gfx::GLShareGroup* share_group, | 61 gfx::GLShareGroup* share_group, |
| 61 gpu::gles2::MailboxManager* mailbox_manager, | 62 gpu::gles2::MailboxManager* mailbox_manager, |
| 63 gpu::gles2::SubscriptionRefSet* subscription_ref_set, |
| 62 int client_id, | 64 int client_id, |
| 63 bool software, | 65 bool software, |
| 64 bool allow_future_sync_points); | 66 bool allow_future_sync_points); |
| 65 ~GpuChannel() override; | 67 ~GpuChannel() override; |
| 66 | 68 |
| 67 void Init(base::MessageLoopProxy* io_message_loop, | 69 void Init(base::MessageLoopProxy* io_message_loop, |
| 68 base::WaitableEvent* shutdown_event); | 70 base::WaitableEvent* shutdown_event); |
| 69 | 71 |
| 70 // Get the GpuChannelManager that owns this channel. | 72 // Get the GpuChannelManager that owns this channel. |
| 71 GpuChannelManager* gpu_channel_manager() const { | 73 GpuChannelManager* gpu_channel_manager() const { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 214 |
| 213 // Used to implement message routing functionality to CommandBuffer objects | 215 // Used to implement message routing functionality to CommandBuffer objects |
| 214 MessageRouter router_; | 216 MessageRouter router_; |
| 215 | 217 |
| 216 // The share group that all contexts associated with a particular renderer | 218 // The share group that all contexts associated with a particular renderer |
| 217 // process use. | 219 // process use. |
| 218 scoped_refptr<gfx::GLShareGroup> share_group_; | 220 scoped_refptr<gfx::GLShareGroup> share_group_; |
| 219 | 221 |
| 220 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; | 222 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; |
| 221 | 223 |
| 224 scoped_refptr<gpu::gles2::SubscriptionRefSet> subscription_ref_set_; |
| 225 |
| 222 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_; | 226 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_; |
| 223 | 227 |
| 224 typedef IDMap<GpuCommandBufferStub, IDMapOwnPointer> StubMap; | 228 typedef IDMap<GpuCommandBufferStub, IDMapOwnPointer> StubMap; |
| 225 StubMap stubs_; | 229 StubMap stubs_; |
| 226 | 230 |
| 227 bool log_messages_; // True if we should log sent and received messages. | 231 bool log_messages_; // True if we should log sent and received messages. |
| 228 gpu::gles2::DisallowedFeatures disallowed_features_; | 232 gpu::gles2::DisallowedFeatures disallowed_features_; |
| 229 GpuWatchdog* watchdog_; | 233 GpuWatchdog* watchdog_; |
| 230 bool software_; | 234 bool software_; |
| 231 bool handle_messages_scheduled_; | 235 bool handle_messages_scheduled_; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 243 // that any WeakPtrs to Controller are invalidated before its members | 247 // that any WeakPtrs to Controller are invalidated before its members |
| 244 // variable's destructors are executed, rendering them invalid. | 248 // variable's destructors are executed, rendering them invalid. |
| 245 base::WeakPtrFactory<GpuChannel> weak_factory_; | 249 base::WeakPtrFactory<GpuChannel> weak_factory_; |
| 246 | 250 |
| 247 DISALLOW_COPY_AND_ASSIGN(GpuChannel); | 251 DISALLOW_COPY_AND_ASSIGN(GpuChannel); |
| 248 }; | 252 }; |
| 249 | 253 |
| 250 } // namespace content | 254 } // namespace content |
| 251 | 255 |
| 252 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 256 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
| OLD | NEW |