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

Unified Diff: media/video/picture.h

Issue 1751323002: Allow multiple texture ids per picture buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « media/filters/gpu_video_decoder.cc ('k') | media/video/picture.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/picture.h
diff --git a/media/video/picture.h b/media/video/picture.h
index 13d7c9070df18548e8598871cf6027589bf405f6..d919ad321285ef127ec19d6a6ead762f4209c733 100644
--- a/media/video/picture.h
+++ b/media/video/picture.h
@@ -18,15 +18,21 @@ namespace media {
// This is the media-namespace equivalent of PP_PictureBuffer_Dev.
class MEDIA_EXPORT PictureBuffer {
public:
- PictureBuffer(int32_t id, gfx::Size size, uint32_t texture_id);
+ enum { kMaxPlanes = 4 };
+
+ struct TextureIds {
sandersd (OOO until July 31) 2016/03/23 00:41:00 Is there a particular reason to be using a struct,
+ TextureIds() { memset(ids, 0, sizeof(ids)); }
+ uint32_t ids[kMaxPlanes];
+ };
+ PictureBuffer(int32_t id, gfx::Size size, TextureIds texture_ids);
PictureBuffer(int32_t id,
gfx::Size size,
- uint32_t texture_id,
- uint32_t internal_texture_id);
+ TextureIds texture_ids,
+ TextureIds internal_texture_ids);
PictureBuffer(int32_t id,
gfx::Size size,
- uint32_t texture_id,
- const gpu::Mailbox& texture_mailbox);
+ TextureIds texture_ids,
+ gpu::Mailbox texture_mailbox[kMaxPlanes]);
// Returns the client-specified id of the buffer.
int32_t id() const { return id_; }
@@ -40,20 +46,20 @@ class MEDIA_EXPORT PictureBuffer {
// Returns the id of the texture.
// NOTE: The texture id in the renderer process corresponds to a different
// texture id in the GPU process.
- uint32_t texture_id() const { return texture_id_; }
+ TextureIds texture_ids() const { return texture_ids_; }
- uint32_t internal_texture_id() const { return internal_texture_id_; }
+ TextureIds internal_texture_ids() const { return internal_texture_ids_; }
- const gpu::Mailbox& texture_mailbox() const {
- return texture_mailbox_;
+ const gpu::Mailbox& texture_mailbox(size_t plane) const {
+ return texture_mailbox_[plane];
}
private:
int32_t id_;
gfx::Size size_;
- uint32_t texture_id_;
- uint32_t internal_texture_id_;
- gpu::Mailbox texture_mailbox_;
+ TextureIds texture_ids_;
+ TextureIds internal_texture_ids_;
+ gpu::Mailbox texture_mailbox_[kMaxPlanes];
};
// A decoded picture frame.
« no previous file with comments | « media/filters/gpu_video_decoder.cc ('k') | media/video/picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698