| Index: content/common/gpu/media/avda_shared_state.h
|
| diff --git a/content/common/gpu/media/avda_shared_state.h b/content/common/gpu/media/avda_shared_state.h
|
| index eb62681fcd5bd13474c0146f31eabaf1f8524b77..3b384469944cbca029f30ec5949520eedc4964b6 100644
|
| --- a/content/common/gpu/media/avda_shared_state.h
|
| +++ b/content/common/gpu/media/avda_shared_state.h
|
| @@ -15,6 +15,7 @@
|
|
|
| namespace gfx {
|
| class SurfaceTexture;
|
| +class GLShareGroup;
|
| }
|
|
|
| namespace content {
|
| @@ -50,10 +51,26 @@ class AVDASharedState : public base::RefCounted<AVDASharedState> {
|
| return surface_texture_is_attached_;
|
| }
|
|
|
| + // TODO(liberato): move the surface texture here and make these calls
|
| + // attach / detach it also. There are several changes going on in avda
|
| + // concurrently, so I don't want to change that until the dust settles.
|
| + // AVDACodecImage would no longer hold the surface texture.
|
| +
|
| // Call this when the SurfaceTexture is attached to a GL context. This will
|
| // update surface_texture_is_attached(), and set the context() and surface()
|
| // to match.
|
| - void did_attach_surface_texture();
|
| + void DidAttachSurfaceTexture();
|
| +
|
| + // Call this when the SurfaceTexture is detached from its GL context. This
|
| + // will cause us to forget the last binding.
|
| + void DidDetachSurfaceTexture();
|
| +
|
| + // Get and set the share group for our SurfaceTexture.
|
| + void set_share_group(const scoped_refptr<gfx::GLShareGroup>& share_group) {
|
| + share_group_ = share_group;
|
| + }
|
| +
|
| + gfx::GLShareGroup* share_group() const { return share_group_.get(); }
|
|
|
| private:
|
| // Platform gl texture Id for |surface_texture_|. This will be zero if
|
| @@ -72,6 +89,9 @@ class AVDASharedState : public base::RefCounted<AVDASharedState> {
|
| scoped_refptr<gfx::GLContext> context_;
|
| scoped_refptr<gfx::GLSurface> surface_;
|
|
|
| + // The GL share group that we must be to reference our surface texture.
|
| + scoped_refptr<gfx::GLShareGroup> share_group_;
|
| +
|
| protected:
|
| virtual ~AVDASharedState();
|
|
|
|
|