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

Unified Diff: media/video/picture.h

Issue 1750213002: Fix Android black frames from MSE config changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address the easy feedback, awaiting high level design sign off 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: media/video/picture.h
diff --git a/media/video/picture.h b/media/video/picture.h
index 5ec3c55d9c8d4bf61fe1abcf5054bfd42b03db0f..65b2e781e0efa293209df9998ef08b76461daf7e 100644
--- a/media/video/picture.h
+++ b/media/video/picture.h
@@ -35,6 +35,7 @@ class MEDIA_EXPORT PictureBuffer {
gfx::Size size() const {
return size_;
}
+ void set_size(gfx::Size size) { size_ = size; }
DaleCurtis 2016/03/08 18:29:03 const& ?
chcunningham 2016/03/08 22:19:13 Done.
// Returns the id of the texture.
// NOTE: The texture id in the renderer process corresponds to a different
@@ -62,7 +63,8 @@ class MEDIA_EXPORT Picture {
Picture(int32_t picture_buffer_id,
int32_t bitstream_buffer_id,
const gfx::Rect& visible_rect,
- bool allow_overlay);
+ bool allow_overlay,
+ bool size_changed);
// Returns the id of the picture buffer where this picture is contained.
int32_t picture_buffer_id() const { return picture_buffer_id_; }
@@ -81,11 +83,18 @@ class MEDIA_EXPORT Picture {
bool allow_overlay() const { return allow_overlay_; }
+ // Returns true when the VDA has adjusted the resolution of this Picture
+ // without requesting new PictureBuffers. GpuVideoDecoder should read this
+ // as a signal to update the size of the corresponding PicutreBuffer using
+ // visible_rect() upon receiving this Picture from a VDA.
+ bool size_changed() const { return size_changed_; };
+
private:
int32_t picture_buffer_id_;
int32_t bitstream_buffer_id_;
gfx::Rect visible_rect_;
bool allow_overlay_;
+ bool size_changed_;
};
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698