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

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

Issue 1750213002: Fix Android black frames from MSE config changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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/android_video_decode_accelerator.h
diff --git a/content/common/gpu/media/android_video_decode_accelerator.h b/content/common/gpu/media/android_video_decode_accelerator.h
index ab2c4da815e9d92c4c8747b7b68feea2295b87e5..7c3a28a3e5a8ccfb4dbd5ec1653742203d69ee40 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.h
+++ b/content/common/gpu/media/android_video_decode_accelerator.h
@@ -98,6 +98,14 @@ class CONTENT_EXPORT AndroidVideoDecodeAccelerator
// Whether the pictures produced by this backing strategy are overlayable.
virtual bool ArePicturesOverlayable() = 0;
+
+ // Size may have changed due to resolution change since the last time this
+ // PictureBuffer was used. Update the size of the picture buffer to
+ // |new_size| and also update any size-dependent state (e.g. size of
+ // associated texture). Callers should set the correct GL context prior to
+ // calling.
+ virtual void UpdatePictureBufferSize(media::PictureBuffer* picture_buffer,
+ const gfx::Size& new_size);
};
AndroidVideoDecodeAccelerator(
@@ -122,6 +130,8 @@ class CONTENT_EXPORT AndroidVideoDecodeAccelerator
const gfx::Size& GetSize() const override;
const base::ThreadChecker& ThreadChecker() const override;
base::WeakPtr<gpu::gles2::GLES2Decoder> GetGlDecoder() const override;
+ gpu::gles2::TextureRef* GetTextureForPicture(
+ const media::PictureBuffer& picture_buffer) override;
void PostError(const ::tracked_objects::Location& from_here,
media::VideoDecodeAccelerator::Error error) override;

Powered by Google App Engine
This is Rietveld 408576698