Index: content/renderer/gpu/gpu_video_decode_accelerator_host.h |
diff --git a/content/renderer/gpu/gpu_video_decode_accelerator_host.h b/content/renderer/gpu/gpu_video_decode_accelerator_host.h |
index ea73da0ba3ff131492094521c60e90869c0c6965..4cc0746baa1cf701a57deb79ca33f26fcd2ac7ce 100644 |
--- a/content/renderer/gpu/gpu_video_decode_accelerator_host.h |
+++ b/content/renderer/gpu/gpu_video_decode_accelerator_host.h |
@@ -14,6 +14,9 @@ |
class MessageLoop; |
class MessageRouter; |
+namespace gpu { |
+class CommandBufferHelper; |
+} |
// This class is used to talk to VideoDecodeAccelerator in the Gpu process |
// through IPC messages. |
@@ -25,7 +28,8 @@ class GpuVideoDecodeAcceleratorHost : public IPC::Channel::Listener, |
GpuVideoDecodeAcceleratorHost(MessageRouter* router, |
IPC::Message::Sender* ipc_sender, |
int32 decoder_host_id, |
- uint32 command_buffer_route_id, |
+ int32 command_buffer_route_id, |
+ gpu::CommandBufferHelper* cmd_buffer_helper, |
media::VideoDecodeAccelerator::Client* client); |
virtual ~GpuVideoDecodeAcceleratorHost(); |
@@ -39,16 +43,20 @@ class GpuVideoDecodeAcceleratorHost : public IPC::Channel::Listener, |
const std::vector<uint32>& requested_configs, |
std::vector<uint32>* matched_configs) OVERRIDE; |
virtual bool Initialize(const std::vector<uint32>& configs) OVERRIDE; |
- virtual bool Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; |
+ virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; |
virtual void AssignGLESBuffers( |
const std::vector<media::GLESBuffer>& buffers) OVERRIDE; |
virtual void AssignSysmemBuffers( |
const std::vector<media::SysmemBuffer>& buffers) OVERRIDE; |
virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE; |
- virtual bool Flush() OVERRIDE; |
- virtual bool Abort() OVERRIDE; |
+ virtual void Flush() OVERRIDE; |
+ virtual void Abort() OVERRIDE; |
private: |
+ // Insert a token into the command buffer and return a <read,write> token pair |
+ // suitable for sending over IPC. |
+ std::pair<int32, int32> SyncTokens(); |
scherkus (not reviewing)
2011/06/27 22:54:47
again we might want to use a struct defined in con
Ami GONE FROM CHROMIUM
2011/06/28 00:06:35
See gpu_messages.h reply.
|
+ |
void OnBitstreamBufferProcessed(int32 bitstream_buffer_id); |
void OnProvidePictureBuffer( |
uint32 num_requested_buffers, const gfx::Size& buffer_size, int32 mem_type); |
@@ -78,7 +86,11 @@ class GpuVideoDecodeAcceleratorHost : public IPC::Channel::Listener, |
// Route ID for the command buffer associated with the context the GPU Video |
// Decoder uses. |
- uint32 command_buffer_route_id_; |
+ int32 command_buffer_route_id_; |
+ |
+ // Helper for the command buffer associated with the context the GPU Video |
+ // Decoder uses. |
+ gpu::CommandBufferHelper* cmd_buffer_helper_; |
// Temporarily store configs here in between Create and Initialize phase. |
std::vector<uint32> configs_; |
@@ -86,6 +98,10 @@ class GpuVideoDecodeAcceleratorHost : public IPC::Channel::Listener, |
// Reference to the client that will receive callbacks from the decoder. |
media::VideoDecodeAccelerator::Client* client_; |
+ // MessageLoop on which this object was created. All Send()'s are trampolined |
+ // to this loop if they are not issued on it by the client. |
+ MessageLoop* message_loop_; |
scherkus (not reviewing)
2011/06/27 22:54:47
do we not know which thread inside the renderer pr
Ami GONE FROM CHROMIUM
2011/06/28 00:06:35
See other response.
|
+ |
DISALLOW_COPY_AND_ASSIGN(GpuVideoDecodeAcceleratorHost); |
}; |