| 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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 struct GPUCreateCommandBufferConfig; | 27 struct GPUCreateCommandBufferConfig; |
| 28 | 28 |
| 29 namespace base { | 29 namespace base { |
| 30 class MessageLoopProxy; | 30 class MessageLoopProxy; |
| 31 class WaitableEvent; | 31 class WaitableEvent; |
| 32 } | 32 } |
| 33 | 33 |
| 34 namespace gpu { | 34 namespace gpu { |
| 35 class PreemptionFlag; | 35 class PreemptionFlag; |
| 36 namespace gles2 { | |
| 37 class ImageManager; | |
| 38 } | |
| 39 } | 36 } |
| 40 | 37 |
| 41 namespace IPC { | 38 namespace IPC { |
| 42 class MessageFilter; | 39 class MessageFilter; |
| 43 } | 40 } |
| 44 | 41 |
| 45 namespace content { | 42 namespace content { |
| 46 class DevToolsGpuAgent; | 43 class DevToolsGpuAgent; |
| 47 class GpuChannelManager; | 44 class GpuChannelManager; |
| 48 class GpuChannelMessageFilter; | 45 class GpuChannelMessageFilter; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // descheduled states. When any stub is descheduled, we stop preempting | 104 // descheduled states. When any stub is descheduled, we stop preempting |
| 108 // other channels. | 105 // other channels. |
| 109 void StubSchedulingChanged(bool scheduled); | 106 void StubSchedulingChanged(bool scheduled); |
| 110 | 107 |
| 111 bool CreateViewCommandBuffer( | 108 bool CreateViewCommandBuffer( |
| 112 const gfx::GLSurfaceHandle& window, | 109 const gfx::GLSurfaceHandle& window, |
| 113 int32 surface_id, | 110 int32 surface_id, |
| 114 const GPUCreateCommandBufferConfig& init_params, | 111 const GPUCreateCommandBufferConfig& init_params, |
| 115 int32 route_id); | 112 int32 route_id); |
| 116 | 113 |
| 117 void CreateImage( | |
| 118 gfx::PluginWindowHandle window, | |
| 119 int32 image_id, | |
| 120 gfx::Size* size); | |
| 121 void DeleteImage(int32 image_id); | |
| 122 | |
| 123 gfx::GLShareGroup* share_group() const { return share_group_.get(); } | 114 gfx::GLShareGroup* share_group() const { return share_group_.get(); } |
| 124 | 115 |
| 125 GpuCommandBufferStub* LookupCommandBuffer(int32 route_id); | 116 GpuCommandBufferStub* LookupCommandBuffer(int32 route_id); |
| 126 | 117 |
| 127 void LoseAllContexts(); | 118 void LoseAllContexts(); |
| 128 void MarkAllContextsLost(); | 119 void MarkAllContextsLost(); |
| 129 | 120 |
| 130 // Called to add a listener for a particular message routing ID. | 121 // Called to add a listener for a particular message routing ID. |
| 131 // Returns true if succeeded. | 122 // Returns true if succeeded. |
| 132 bool AddRoute(int32 route_id, IPC::Listener* listener); | 123 bool AddRoute(int32 route_id, IPC::Listener* listener); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 std::string channel_id_; | 192 std::string channel_id_; |
| 202 | 193 |
| 203 // Used to implement message routing functionality to CommandBuffer objects | 194 // Used to implement message routing functionality to CommandBuffer objects |
| 204 MessageRouter router_; | 195 MessageRouter router_; |
| 205 | 196 |
| 206 // The share group that all contexts associated with a particular renderer | 197 // The share group that all contexts associated with a particular renderer |
| 207 // process use. | 198 // process use. |
| 208 scoped_refptr<gfx::GLShareGroup> share_group_; | 199 scoped_refptr<gfx::GLShareGroup> share_group_; |
| 209 | 200 |
| 210 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; | 201 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; |
| 211 scoped_refptr<gpu::gles2::ImageManager> image_manager_; | |
| 212 | 202 |
| 213 typedef IDMap<GpuCommandBufferStub, IDMapOwnPointer> StubMap; | 203 typedef IDMap<GpuCommandBufferStub, IDMapOwnPointer> StubMap; |
| 214 StubMap stubs_; | 204 StubMap stubs_; |
| 215 | 205 |
| 216 bool log_messages_; // True if we should log sent and received messages. | 206 bool log_messages_; // True if we should log sent and received messages. |
| 217 gpu::gles2::DisallowedFeatures disallowed_features_; | 207 gpu::gles2::DisallowedFeatures disallowed_features_; |
| 218 GpuWatchdog* watchdog_; | 208 GpuWatchdog* watchdog_; |
| 219 bool software_; | 209 bool software_; |
| 220 bool handle_messages_scheduled_; | 210 bool handle_messages_scheduled_; |
| 221 IPC::Message* currently_processing_message_; | 211 IPC::Message* currently_processing_message_; |
| 222 | 212 |
| 223 base::WeakPtrFactory<GpuChannel> weak_factory_; | 213 base::WeakPtrFactory<GpuChannel> weak_factory_; |
| 224 | 214 |
| 225 scoped_refptr<GpuChannelMessageFilter> filter_; | 215 scoped_refptr<GpuChannelMessageFilter> filter_; |
| 226 scoped_refptr<base::MessageLoopProxy> io_message_loop_; | 216 scoped_refptr<base::MessageLoopProxy> io_message_loop_; |
| 227 scoped_ptr<DevToolsGpuAgent> devtools_gpu_agent_; | 217 scoped_ptr<DevToolsGpuAgent> devtools_gpu_agent_; |
| 228 | 218 |
| 229 size_t num_stubs_descheduled_; | 219 size_t num_stubs_descheduled_; |
| 230 | 220 |
| 231 bool allow_future_sync_points_; | 221 bool allow_future_sync_points_; |
| 232 | 222 |
| 233 DISALLOW_COPY_AND_ASSIGN(GpuChannel); | 223 DISALLOW_COPY_AND_ASSIGN(GpuChannel); |
| 234 }; | 224 }; |
| 235 | 225 |
| 236 } // namespace content | 226 } // namespace content |
| 237 | 227 |
| 238 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 228 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
| OLD | NEW |