| Index: media/gpu/avda_codec_image.h
|
| diff --git a/media/gpu/avda_codec_image.h b/media/gpu/avda_codec_image.h
|
| index 95ec47cf1a84ad57bf20e5e4e37b73e52fcc62c5..2d7833779b61b8d383e28153279e6df32da12272 100644
|
| --- a/media/gpu/avda_codec_image.h
|
| +++ b/media/gpu/avda_codec_image.h
|
| @@ -25,8 +25,7 @@ class VideoCodecBridge;
|
| // needed in order to draw them.
|
| class AVDACodecImage : public gpu::gles2::GLStreamTextureImage {
|
| public:
|
| - AVDACodecImage(int picture_buffer_id,
|
| - const scoped_refptr<AVDASharedState>& shared_state,
|
| + AVDACodecImage(const scoped_refptr<AVDASharedState>& shared_state,
|
| VideoCodecBridge* codec,
|
| const base::WeakPtr<gpu::gles2::GLES2Decoder>& decoder);
|
|
|
| @@ -76,12 +75,11 @@ class AVDACodecImage : public gpu::gles2::GLStreamTextureImage {
|
| void set_texture(gpu::gles2::Texture* texture) { texture_ = texture; }
|
|
|
| // Decoded buffer index that has the image for us to display.
|
| - void set_media_codec_buffer_index(int buffer_index) {
|
| - codec_buffer_index_ = buffer_index;
|
| - }
|
| + void SetBufferMetadata(int buffer_index,
|
| + bool has_surface_texture,
|
| + const gfx::Size size);
|
|
|
| - // Set the size of the current image.
|
| - void set_size(const gfx::Size& size) { size_ = size; }
|
| + bool SetSharedState(const scoped_refptr<AVDASharedState>& shared_state);
|
|
|
| // Indicates if the codec buffer has been released to the back buffer.
|
| bool was_rendered_to_back_buffer() const {
|
| @@ -93,6 +91,10 @@ class AVDACodecImage : public gpu::gles2::GLStreamTextureImage {
|
| return codec_buffer_index_ == kRendered;
|
| }
|
|
|
| + bool has_unrendered_frame() const {
|
| + return codec_buffer_index_ >= kUpdateOnly;
|
| + }
|
| +
|
| protected:
|
| ~AVDACodecImage() override;
|
|
|
| @@ -142,15 +144,13 @@ class AVDACodecImage : public gpu::gles2::GLStreamTextureImage {
|
|
|
| const base::WeakPtr<gpu::gles2::GLES2Decoder> decoder_;
|
|
|
| - // Indicates if we're rendering to a SurfaceTexture or not.
|
| - const bool has_surface_texture_;
|
| + // Indicates if we're rendering to a SurfaceTexture or not. Set during the
|
| + // call to SetBufferMetadata().
|
| + bool has_surface_texture_;
|
|
|
| // The texture that we're attached to.
|
| gpu::gles2::Texture* texture_;
|
|
|
| - // The picture buffer id attached to this image.
|
| - int picture_buffer_id_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(AVDACodecImage);
|
| };
|
|
|
|
|