Chromium Code Reviews| 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. |