Chromium Code Reviews| Index: media/gpu/avda_codec_image.h |
| diff --git a/media/gpu/avda_codec_image.h b/media/gpu/avda_codec_image.h |
| index 6d5e33d0ee5c669bb002f59d8537c34bdd3e4901..2b5e059293552ec33f558f2d426397ff23367c85 100644 |
| --- a/media/gpu/avda_codec_image.h |
| +++ b/media/gpu/avda_codec_image.h |
| @@ -75,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. |
|
watk
2016/11/08 22:59:03
comment out of date
DaleCurtis
2016/11/08 23:50:11
Done.
|
| - 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 { |
| @@ -92,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; |
| @@ -141,8 +144,9 @@ 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_; |