| 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_COMMAND_BUFFER_STUB_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 IPC::Message* reply_message); | 175 IPC::Message* reply_message); |
| 176 void OnAsyncFlush(int32_t put_offset, | 176 void OnAsyncFlush(int32_t put_offset, |
| 177 uint32_t flush_count, | 177 uint32_t flush_count, |
| 178 const std::vector<ui::LatencyInfo>& latency_info); | 178 const std::vector<ui::LatencyInfo>& latency_info); |
| 179 void OnRegisterTransferBuffer(int32_t id, | 179 void OnRegisterTransferBuffer(int32_t id, |
| 180 base::SharedMemoryHandle transfer_buffer, | 180 base::SharedMemoryHandle transfer_buffer, |
| 181 uint32_t size); | 181 uint32_t size); |
| 182 void OnDestroyTransferBuffer(int32_t id); | 182 void OnDestroyTransferBuffer(int32_t id); |
| 183 void OnGetTransferBuffer(int32_t id, IPC::Message* reply_message); | 183 void OnGetTransferBuffer(int32_t id, IPC::Message* reply_message); |
| 184 | 184 |
| 185 void OnCreateVideoDecoder(const media::VideoDecodeAccelerator::Config& config, | |
| 186 int32_t route_id, | |
| 187 IPC::Message* reply_message); | |
| 188 void OnCreateVideoEncoder(media::VideoPixelFormat input_format, | |
| 189 const gfx::Size& input_visible_size, | |
| 190 media::VideoCodecProfile output_profile, | |
| 191 uint32_t initial_bitrate, | |
| 192 int32_t route_id, | |
| 193 IPC::Message* reply_message); | |
| 194 | |
| 195 void OnEnsureBackbuffer(); | 185 void OnEnsureBackbuffer(); |
| 196 | 186 |
| 197 void OnSignalSyncToken(const gpu::SyncToken& sync_token, uint32_t id); | 187 void OnSignalSyncToken(const gpu::SyncToken& sync_token, uint32_t id); |
| 198 void OnSignalAck(uint32_t id); | 188 void OnSignalAck(uint32_t id); |
| 199 void OnSignalQuery(uint32_t query, uint32_t id); | 189 void OnSignalQuery(uint32_t query, uint32_t id); |
| 200 | 190 |
| 201 void OnFenceSyncRelease(uint64_t release); | 191 void OnFenceSyncRelease(uint64_t release); |
| 202 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id, | 192 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id, |
| 203 gpu::CommandBufferId command_buffer_id, | 193 gpu::CommandBufferId command_buffer_id, |
| 204 uint64_t release); | 194 uint64_t release); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 233 | 223 |
| 234 bool CheckContextLost(); | 224 bool CheckContextLost(); |
| 235 void CheckCompleteWaits(); | 225 void CheckCompleteWaits(); |
| 236 void PullTextureUpdates(gpu::CommandBufferNamespace namespace_id, | 226 void PullTextureUpdates(gpu::CommandBufferNamespace namespace_id, |
| 237 gpu::CommandBufferId command_buffer_id, | 227 gpu::CommandBufferId command_buffer_id, |
| 238 uint32_t release); | 228 uint32_t release); |
| 239 | 229 |
| 240 // The lifetime of objects of this class is managed by a GpuChannel. The | 230 // The lifetime of objects of this class is managed by a GpuChannel. The |
| 241 // GpuChannels destroy all the GpuCommandBufferStubs that they own when they | 231 // GpuChannels destroy all the GpuCommandBufferStubs that they own when they |
| 242 // are destroyed. So a raw pointer is safe. | 232 // are destroyed. So a raw pointer is safe. |
| 243 GpuChannel* channel_; | 233 GpuChannel* const channel_; |
| 244 | 234 |
| 245 // Outlives the stub. | 235 // Outlives the stub. |
| 246 gpu::SyncPointManager* sync_point_manager_; | 236 gpu::SyncPointManager* const sync_point_manager_; |
| 247 | 237 |
| 248 // Task runner for main thread. | 238 // Task runner for main thread. |
| 249 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 239 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 250 | 240 |
| 251 // The group of contexts that share namespaces with this context. | 241 // The group of contexts that share namespaces with this context. |
| 252 scoped_refptr<gpu::gles2::ContextGroup> context_group_; | 242 scoped_refptr<gpu::gles2::ContextGroup> context_group_; |
| 253 | 243 |
| 254 bool initialized_; | 244 bool initialized_; |
| 255 gfx::GLSurfaceHandle handle_; | 245 gfx::GLSurfaceHandle handle_; |
| 256 gfx::Size initial_size_; | 246 gfx::Size initial_size_; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 280 |
| 291 scoped_ptr<WaitForCommandState> wait_for_token_; | 281 scoped_ptr<WaitForCommandState> wait_for_token_; |
| 292 scoped_ptr<WaitForCommandState> wait_for_get_offset_; | 282 scoped_ptr<WaitForCommandState> wait_for_get_offset_; |
| 293 | 283 |
| 294 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 284 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
| 295 }; | 285 }; |
| 296 | 286 |
| 297 } // namespace content | 287 } // namespace content |
| 298 | 288 |
| 299 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 289 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| OLD | NEW |