Index: content/common/gpu/media/gpu_video_decode_accelerator.h |
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.h b/content/common/gpu/media/gpu_video_decode_accelerator.h |
index aa36bf17b64f5f3bb4b7fbce6346ab4adcb42fe6..4247c1d9226d85f28749fa269524695345999a0e 100644 |
--- a/content/common/gpu/media/gpu_video_decode_accelerator.h |
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.h |
@@ -16,6 +16,7 @@ |
#include "base/memory/shared_memory.h" |
#include "base/synchronization/waitable_event.h" |
#include "content/common/gpu/gpu_command_buffer_stub.h" |
+#include "content/public/common/gpu_video_decode_accelerator_helpers.h" |
#include "gpu/command_buffer/service/texture_manager.h" |
#include "gpu/config/gpu_info.h" |
#include "ipc/ipc_listener.h" |
@@ -72,19 +73,8 @@ class GpuVideoDecodeAccelerator |
bool Initialize(const media::VideoDecodeAccelerator::Config& config); |
private: |
- typedef scoped_ptr<media::VideoDecodeAccelerator>( |
- GpuVideoDecodeAccelerator::*CreateVDAFp)(); |
- |
class MessageFilter; |
- scoped_ptr<media::VideoDecodeAccelerator> CreateDXVAVDA(); |
- scoped_ptr<media::VideoDecodeAccelerator> CreateV4L2VDA(); |
- scoped_ptr<media::VideoDecodeAccelerator> CreateV4L2SliceVDA(); |
- scoped_ptr<media::VideoDecodeAccelerator> CreateVaapiVDA(); |
- scoped_ptr<media::VideoDecodeAccelerator> CreateVTVDA(); |
- scoped_ptr<media::VideoDecodeAccelerator> CreateOzoneVDA(); |
- scoped_ptr<media::VideoDecodeAccelerator> CreateAndroidVDA(); |
- |
// We only allow self-delete, from OnWillDestroyStub(), after cleanup there. |
~GpuVideoDecodeAccelerator() override; |
@@ -104,11 +94,6 @@ class GpuVideoDecodeAccelerator |
// Sets the texture to cleared. |
void SetTextureCleared(const media::Picture& picture); |
- // Helper to bind |image| to the texture specified by |client_texture_id|. |
- void BindImage(uint32_t client_texture_id, |
- uint32_t texture_target, |
- scoped_refptr<gl::GLImage> image); |
- |
// Route ID to communicate with the host. |
const int32_t host_route_id_; |
@@ -120,9 +105,17 @@ class GpuVideoDecodeAccelerator |
// The underlying VideoDecodeAccelerator. |
scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; |
+ // Callback to return current GLContext, if available. |
+ gpu_vda_helpers::GetGLContextCb get_gl_context_cb_; |
+ |
// Callback for making the relevant context current for GL calls. |
- // Returns false if failed. |
- base::Callback<bool(void)> make_context_current_; |
+ gpu_vda_helpers::MakeGLContextCurrentCb make_context_current_cb_; |
+ |
+ // Callback to bind a GLImage to a given texture id and target. |
+ gpu_vda_helpers::BindGLImageCb bind_image_cb_; |
+ |
+ // Callback to return a WeakPtr to GLES2Decoder. |
+ gpu_vda_helpers::GetGLES2DecoderCb get_gles2_decoder_cb_; |
// The texture dimensions as requested by ProvidePictureBuffers(). |
gfx::Size texture_dimensions_; |