| Index: content/common/gpu/media/android_deferred_rendering_backing_strategy.h
|
| diff --git a/content/common/gpu/media/android_deferred_rendering_backing_strategy.h b/content/common/gpu/media/android_deferred_rendering_backing_strategy.h
|
| index 830eca307dbc8c2011e4fb88d4c5d721a337a3d0..4315077af1429e94b815ca4701fd1f5f9049d66e 100644
|
| --- a/content/common/gpu/media/android_deferred_rendering_backing_strategy.h
|
| +++ b/content/common/gpu/media/android_deferred_rendering_backing_strategy.h
|
| @@ -10,6 +10,7 @@
|
| #include "base/macros.h"
|
| #include "content/common/content_export.h"
|
| #include "content/common/gpu/media/android_video_decode_accelerator.h"
|
| +#include "ui/gl/gl_bindings.h"
|
|
|
| namespace gl {
|
| class GLImage;
|
| @@ -46,7 +47,7 @@ class CONTENT_EXPORT AndroidDeferredRenderingBackingStrategy
|
| uint32_t GetTextureTarget() const override;
|
| void UseCodecBufferForPictureBuffer(int32_t codec_buffer_index,
|
| const media::PictureBuffer&) override;
|
| - void AssignOnePictureBuffer(const media::PictureBuffer&) override;
|
| + void AssignOnePictureBuffer(const media::PictureBuffer&, bool) override;
|
| void ReuseOnePictureBuffer(const media::PictureBuffer&) override;
|
| void DismissOnePictureBuffer(const media::PictureBuffer&) override;
|
| void CodecChanged(
|
| @@ -79,10 +80,26 @@ class CONTENT_EXPORT AndroidDeferredRenderingBackingStrategy
|
| // not set.
|
| bool DoesSurfaceTextureDetachWork() const;
|
|
|
| + // Create an EGLImage by creating a 2D texture, calling |init_texture| while
|
| + // it's bound, and then creating the EGLImage from that. The caller takes
|
| + // ownership of the resulting EGLImage.
|
| + EGLImageKHR CreateImageFromTexture(
|
| + const base::Callback<bool(GLint source_id)>& init_texture);
|
| +
|
| + // Init |source_id| to be a copy of the current |surface_texture_| buffer.
|
| + // |source_id| is the service id of the 2D texture.
|
| + bool InitTextureWithCopy(GLint source_id);
|
| +
|
| + // Init |source_id| to be a 1x1 transparent texture.
|
| + bool InitTransparentTexture(GLint source_id);
|
| +
|
| scoped_refptr<AVDASharedState> shared_state_;
|
|
|
| AVDAStateProvider* state_provider_;
|
|
|
| + // EGLImage for a 1x1 transparent texture, or EGL_NO_IMAGE_KHR.
|
| + EGLImageKHR transparent_image_;
|
| +
|
| // The SurfaceTexture to render to. Non-null after Initialize() if
|
| // we're not rendering to a SurfaceView.
|
| scoped_refptr<gfx::SurfaceTexture> surface_texture_;
|
|
|