| 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_COMMAND_BUFFER_PROXY_IMPL_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "gpu/ipc/command_buffer_proxy.h" | 12 #include "gpu/ipc/command_buffer_proxy.h" |
| 13 | 13 |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/containers/hash_tables.h" | 16 #include "base/containers/hash_tables.h" |
| 17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
| 19 #include "base/observer_list.h" | 19 #include "base/observer_list.h" |
| 20 #include "content/common/gpu/gpu_memory_allocation.h" | 20 #include "content/common/gpu/gpu_memory_allocation.h" |
| 21 #include "content/common/gpu/gpu_memory_allocation.h" | 21 #include "content/common/gpu/gpu_memory_allocation.h" |
| 22 #include "content/common/gpu/surface_capturer.h" |
| 22 #include "gpu/command_buffer/common/command_buffer.h" | 23 #include "gpu/command_buffer/common/command_buffer.h" |
| 23 #include "gpu/command_buffer/common/command_buffer_shared.h" | 24 #include "gpu/command_buffer/common/command_buffer_shared.h" |
| 24 #include "ipc/ipc_listener.h" | 25 #include "ipc/ipc_listener.h" |
| 25 #include "media/video/video_decode_accelerator.h" | 26 #include "media/video/video_decode_accelerator.h" |
| 26 #include "ui/base/latency_info.h" | 27 #include "ui/base/latency_info.h" |
| 27 | 28 |
| 28 struct GPUCommandBufferConsoleMessage; | 29 struct GPUCommandBufferConsoleMessage; |
| 29 | 30 |
| 30 namespace base { | 31 namespace base { |
| 31 class SharedMemory; | 32 class SharedMemory; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // Sends an IPC message to create a GpuVideoDecodeAccelerator. Creates and | 64 // Sends an IPC message to create a GpuVideoDecodeAccelerator. Creates and |
| 64 // returns it as an owned pointer to a media::VideoDecodeAccelerator. Returns | 65 // returns it as an owned pointer to a media::VideoDecodeAccelerator. Returns |
| 65 // NULL on failure to create the GpuVideoDecodeAcceleratorHost. | 66 // NULL on failure to create the GpuVideoDecodeAcceleratorHost. |
| 66 // Note that the GpuVideoDecodeAccelerator may still fail to be created in | 67 // Note that the GpuVideoDecodeAccelerator may still fail to be created in |
| 67 // the GPU process, even if this returns non-NULL. In this case the client is | 68 // the GPU process, even if this returns non-NULL. In this case the client is |
| 68 // notified of an error later. | 69 // notified of an error later. |
| 69 scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecoder( | 70 scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecoder( |
| 70 media::VideoCodecProfile profile, | 71 media::VideoCodecProfile profile, |
| 71 media::VideoDecodeAccelerator::Client* client); | 72 media::VideoDecodeAccelerator::Client* client); |
| 72 | 73 |
| 74 // Send an IPC message to create a SurfaceCapturer. Returns NULL on failure |
| 75 // to create the SurfaceCapturer. |
| 76 scoped_ptr<SurfaceCapturer> CreateSurfaceCapturer( |
| 77 SurfaceCapturer::Client* client); |
| 78 |
| 73 // IPC::Listener implementation: | 79 // IPC::Listener implementation: |
| 74 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 80 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 75 virtual void OnChannelError() OVERRIDE; | 81 virtual void OnChannelError() OVERRIDE; |
| 76 | 82 |
| 77 // CommandBufferProxy implementation: | 83 // CommandBufferProxy implementation: |
| 78 virtual int GetRouteID() const OVERRIDE; | 84 virtual int GetRouteID() const OVERRIDE; |
| 79 virtual bool Echo(const base::Closure& callback) OVERRIDE; | 85 virtual bool Echo(const base::Closure& callback) OVERRIDE; |
| 80 virtual bool ProduceFrontBuffer(const gpu::Mailbox& mailbox) OVERRIDE; | 86 virtual bool ProduceFrontBuffer(const gpu::Mailbox& mailbox) OVERRIDE; |
| 81 virtual void SetChannelErrorCallback(const base::Closure& callback) OVERRIDE; | 87 virtual void SetChannelErrorCallback(const base::Closure& callback) OVERRIDE; |
| 82 | 88 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 // Tasks to be invoked in SignalSyncPoint responses. | 208 // Tasks to be invoked in SignalSyncPoint responses. |
| 203 uint32 next_signal_id_; | 209 uint32 next_signal_id_; |
| 204 SignalTaskMap signal_tasks_; | 210 SignalTaskMap signal_tasks_; |
| 205 | 211 |
| 206 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 212 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
| 207 }; | 213 }; |
| 208 | 214 |
| 209 } // namespace content | 215 } // namespace content |
| 210 | 216 |
| 211 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 217 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
| OLD | NEW |