Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Unified Diff: content/common/gpu/media/avda_codec_image.h

Issue 1910063005: Store AVDACodecImage list in shared state, cleanup callers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: It lives! Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/media/avda_codec_image.h
diff --git a/content/common/gpu/media/avda_codec_image.h b/content/common/gpu/media/avda_codec_image.h
index 9c8c7f638307c6cff36d6a24a40614b40e4991bc..71baf25ce157fd73fe8aaed2dc3d4e19119a81f0 100644
--- a/content/common/gpu/media/avda_codec_image.h
+++ b/content/common/gpu/media/avda_codec_image.h
@@ -28,10 +28,6 @@ class AVDACodecImage : public gpu::gles2::GLStreamTextureImage {
const base::WeakPtr<gpu::gles2::GLES2Decoder>& decoder,
const scoped_refptr<gfx::SurfaceTexture>& surface_texture);
- protected:
- ~AVDACodecImage() override;
-
- public:
// gl::GLImage implementation
void Destroy(bool have_context) override;
gfx::Size GetSize() override;
@@ -53,7 +49,6 @@ class AVDACodecImage : public gpu::gles2::GLStreamTextureImage {
// gpu::gles2::GLStreamTextureMatrix implementation
void GetTextureMatrix(float xform[16]) override;
- public:
// Decoded buffer index that has the image for us to display.
void SetMediaCodecBufferIndex(int buffer_index);
@@ -64,10 +59,14 @@ class AVDACodecImage : public gpu::gles2::GLStreamTextureImage {
// Set the size of the current image.
void SetSize(const gfx::Size& size);
+ // Updates the MediaCodec for this image; clears |codec_buffer_index_|.
void SetMediaCodec(media::MediaCodecBridge* codec);
void SetTexture(gpu::gles2::Texture* texture);
+ protected:
+ ~AVDACodecImage() override;
+
private:
enum { kInvalidCodecBufferIndex = -1 };

Powered by Google App Engine
This is Rietveld 408576698