| 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> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 typedef base::Callback<void( | 61 typedef base::Callback<void( |
| 62 const std::string& msg, int id)> GpuConsoleMessageCallback; | 62 const std::string& msg, int id)> GpuConsoleMessageCallback; |
| 63 | 63 |
| 64 CommandBufferProxyImpl(GpuChannelHost* channel, int route_id); | 64 CommandBufferProxyImpl(GpuChannelHost* channel, int route_id); |
| 65 virtual ~CommandBufferProxyImpl(); | 65 virtual ~CommandBufferProxyImpl(); |
| 66 | 66 |
| 67 // Sends an IPC message to create a GpuVideoDecodeAccelerator. Creates and | 67 // Sends an IPC message to create a GpuVideoDecodeAccelerator. Creates and |
| 68 // returns it as an owned pointer to a media::VideoDecodeAccelerator. Returns | 68 // returns it as an owned pointer to a media::VideoDecodeAccelerator. Returns |
| 69 // NULL on failure to create the GpuVideoDecodeAcceleratorHost. | 69 // nullptr on failure to create the GpuVideoDecodeAcceleratorHost. |
| 70 // Note that the GpuVideoDecodeAccelerator may still fail to be created in | 70 // Note that the GpuVideoDecodeAccelerator may still fail to be created in |
| 71 // the GPU process, even if this returns non-NULL. In this case the VDA client | 71 // the GPU process, even if this returns non-nullptr. |
| 72 // is notified of an error later, after Initialize(). | 72 // In this case the VDA clienta is notified of an error later, |
| 73 // after Initialize(). |
| 73 scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecoder(); | 74 scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecoder(); |
| 74 | 75 |
| 75 // Sends an IPC message to create a GpuVideoEncodeAccelerator. Creates and | 76 // Sends an IPC message to create a GpuVideoEncodeAccelerator. Creates and |
| 76 // returns it as an owned pointer to a media::VideoEncodeAccelerator. Returns | 77 // returns it as an owned pointer to a media::VideoEncodeAccelerator. Returns |
| 77 // NULL on failure to create the GpuVideoEncodeAcceleratorHost. | 78 // nullptr on failure to create the GpuVideoEncodeAcceleratorHost. |
| 78 // Note that the GpuVideoEncodeAccelerator may still fail to be created in | 79 // Note that the GpuVideoEncodeAccelerator may still fail to be created in |
| 79 // the GPU process, even if this returns non-NULL. In this case the VEA client | 80 // the GPU process, even if this returns non-nullptr. |
| 81 // In this case the VEA client |
| 80 // is notified of an error later, after Initialize(); | 82 // is notified of an error later, after Initialize(); |
| 81 scoped_ptr<media::VideoEncodeAccelerator> CreateVideoEncoder(); | 83 scoped_ptr<media::VideoEncodeAccelerator> CreateVideoEncoder(); |
| 82 | 84 |
| 83 // IPC::Listener implementation: | 85 // IPC::Listener implementation: |
| 84 virtual bool OnMessageReceived(const IPC::Message& message) override; | 86 virtual bool OnMessageReceived(const IPC::Message& message) override; |
| 85 virtual void OnChannelError() override; | 87 virtual void OnChannelError() override; |
| 86 | 88 |
| 87 // CommandBuffer implementation: | 89 // CommandBuffer implementation: |
| 88 virtual bool Initialize() override; | 90 virtual bool Initialize() override; |
| 89 virtual State GetLastState() override; | 91 virtual State GetLastState() override; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 std::vector<ui::LatencyInfo> latency_info_; | 209 std::vector<ui::LatencyInfo> latency_info_; |
| 208 | 210 |
| 209 SwapBuffersCompletionCallback swap_buffers_completion_callback_; | 211 SwapBuffersCompletionCallback swap_buffers_completion_callback_; |
| 210 | 212 |
| 211 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 213 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
| 212 }; | 214 }; |
| 213 | 215 |
| 214 } // namespace content | 216 } // namespace content |
| 215 | 217 |
| 216 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 218 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
| OLD | NEW |