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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 typedef base::Callback<void( | 60 typedef base::Callback<void( |
61 const std::string& msg, int id)> GpuConsoleMessageCallback; | 61 const std::string& msg, int id)> GpuConsoleMessageCallback; |
62 | 62 |
63 CommandBufferProxyImpl(GpuChannelHost* channel, int route_id); | 63 CommandBufferProxyImpl(GpuChannelHost* channel, int route_id); |
64 virtual ~CommandBufferProxyImpl(); | 64 virtual ~CommandBufferProxyImpl(); |
65 | 65 |
66 // Sends an IPC message to create a GpuVideoDecodeAccelerator. Creates and | 66 // Sends an IPC message to create a GpuVideoDecodeAccelerator. Creates and |
67 // returns it as an owned pointer to a media::VideoDecodeAccelerator. Returns | 67 // returns it as an owned pointer to a media::VideoDecodeAccelerator. Returns |
68 // NULL on failure to create the GpuVideoDecodeAcceleratorHost. | 68 // NULL on failure to create the GpuVideoDecodeAcceleratorHost. |
69 // Note that the GpuVideoDecodeAccelerator may still fail to be created in | 69 // Note that the GpuVideoDecodeAccelerator may still fail to be created in |
70 // the GPU process, even if this returns non-NULL. In this case the client is | 70 // the GPU process, even if this returns non-NULL. In this case the VDA client |
71 // notified of an error later. | 71 // is notified of an error later, after Initialize(). |
72 scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecoder( | 72 scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecoder( |
73 media::VideoCodecProfile profile, | 73 media::VideoCodecProfile profile); |
74 media::VideoDecodeAccelerator::Client* client); | |
75 | 74 |
76 // IPC::Listener implementation: | 75 // IPC::Listener implementation: |
77 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 76 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
78 virtual void OnChannelError() OVERRIDE; | 77 virtual void OnChannelError() OVERRIDE; |
79 | 78 |
80 // CommandBuffer implementation: | 79 // CommandBuffer implementation: |
81 virtual bool Initialize() OVERRIDE; | 80 virtual bool Initialize() OVERRIDE; |
82 virtual State GetState() OVERRIDE; | 81 virtual State GetState() OVERRIDE; |
83 virtual State GetLastState() OVERRIDE; | 82 virtual State GetLastState() OVERRIDE; |
84 virtual int32 GetLastToken() OVERRIDE; | 83 virtual int32 GetLastToken() OVERRIDE; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 GpuMemoryBufferMap gpu_memory_buffers_; | 202 GpuMemoryBufferMap gpu_memory_buffers_; |
204 | 203 |
205 gpu::Capabilities capabilities_; | 204 gpu::Capabilities capabilities_; |
206 | 205 |
207 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 206 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
208 }; | 207 }; |
209 | 208 |
210 } // namespace content | 209 } // namespace content |
211 | 210 |
212 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 211 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
OLD | NEW |