| 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_CLIENT_GPU_CHANNEL_HOST_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 class CommandBufferProxyImpl; | 31 class CommandBufferProxyImpl; |
| 32 struct GPUCreateCommandBufferConfig; | 32 struct GPUCreateCommandBufferConfig; |
| 33 class GURL; | 33 class GURL; |
| 34 class TransportTextureService; | 34 class TransportTextureService; |
| 35 class MessageLoop; | 35 class MessageLoop; |
| 36 | 36 |
| 37 namespace base { | 37 namespace base { |
| 38 class MessageLoopProxy; | 38 class MessageLoopProxy; |
| 39 } | 39 } |
| 40 | 40 |
| 41 namespace content { |
| 42 struct GpuRenderingStats; |
| 43 } |
| 44 |
| 41 namespace IPC { | 45 namespace IPC { |
| 42 class SyncMessageFilter; | 46 class SyncMessageFilter; |
| 43 } | 47 } |
| 44 | 48 |
| 45 struct GpuListenerInfo { | 49 struct GpuListenerInfo { |
| 46 GpuListenerInfo(); | 50 GpuListenerInfo(); |
| 47 ~GpuListenerInfo(); | 51 ~GpuListenerInfo(); |
| 48 | 52 |
| 49 base::WeakPtr<IPC::Listener> listener; | 53 base::WeakPtr<IPC::Listener> listener; |
| 50 scoped_refptr<base::MessageLoopProxy> loop; | 54 scoped_refptr<base::MessageLoopProxy> loop; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // Creates a video decoder in the GPU process. | 128 // Creates a video decoder in the GPU process. |
| 125 // Returned pointer is owned by the CommandBufferProxy for |route_id|. | 129 // Returned pointer is owned by the CommandBufferProxy for |route_id|. |
| 126 GpuVideoDecodeAcceleratorHost* CreateVideoDecoder( | 130 GpuVideoDecodeAcceleratorHost* CreateVideoDecoder( |
| 127 int command_buffer_route_id, | 131 int command_buffer_route_id, |
| 128 media::VideoCodecProfile profile, | 132 media::VideoCodecProfile profile, |
| 129 media::VideoDecodeAccelerator::Client* client); | 133 media::VideoDecodeAccelerator::Client* client); |
| 130 | 134 |
| 131 // Destroy a command buffer created by this channel. | 135 // Destroy a command buffer created by this channel. |
| 132 void DestroyCommandBuffer(CommandBufferProxy* command_buffer); | 136 void DestroyCommandBuffer(CommandBufferProxy* command_buffer); |
| 133 | 137 |
| 138 // Collect rendering stats from GPU process. |
| 139 bool CollectRenderingStatsForSurface( |
| 140 int surface_id, content::GpuRenderingStats* stats); |
| 141 |
| 134 // Add a route for the current message loop. | 142 // Add a route for the current message loop. |
| 135 void AddRoute(int route_id, base::WeakPtr<IPC::Listener> listener); | 143 void AddRoute(int route_id, base::WeakPtr<IPC::Listener> listener); |
| 136 void RemoveRoute(int route_id); | 144 void RemoveRoute(int route_id); |
| 137 | 145 |
| 138 GpuChannelHostFactory* factory() const { return factory_; } | 146 GpuChannelHostFactory* factory() const { return factory_; } |
| 139 int gpu_host_id() const { return gpu_host_id_; } | 147 int gpu_host_id() const { return gpu_host_id_; } |
| 140 base::ProcessId gpu_pid() const { return channel_->peer_pid(); } | 148 base::ProcessId gpu_pid() const { return channel_->peer_pid(); } |
| 141 int client_id() const { return client_id_; } | 149 int client_id() const { return client_id_; } |
| 142 | 150 |
| 143 private: | 151 private: |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 // for calls from contexts that may live on the compositor or main thread. | 195 // for calls from contexts that may live on the compositor or main thread. |
| 188 mutable base::Lock context_lock_; | 196 mutable base::Lock context_lock_; |
| 189 | 197 |
| 190 // A filter for sending messages from thread other than the main thread. | 198 // A filter for sending messages from thread other than the main thread. |
| 191 scoped_refptr<IPC::SyncMessageFilter> sync_filter_; | 199 scoped_refptr<IPC::SyncMessageFilter> sync_filter_; |
| 192 | 200 |
| 193 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 201 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
| 194 }; | 202 }; |
| 195 | 203 |
| 196 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 204 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
| OLD | NEW |