| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/macros.h" |
| 5 #include "media/video/picture.h" | 6 #include "media/video/picture.h" |
| 6 | 7 |
| 7 namespace media { | 8 namespace media { |
| 8 | 9 |
| 9 PictureBuffer::PictureBuffer(int32_t id, gfx::Size size, uint32_t texture_id) | 10 PictureBuffer::PictureBuffer(int32_t id, |
| 10 : id_(id), size_(size), texture_id_(texture_id), internal_texture_id_(0) {} | 11 gfx::Size size, |
| 12 const TextureIds& texture_ids) |
| 13 : id_(id), size_(size), texture_ids_(texture_ids) {} |
| 11 | 14 |
| 12 PictureBuffer::PictureBuffer(int32_t id, | 15 PictureBuffer::PictureBuffer(int32_t id, |
| 13 gfx::Size size, | 16 gfx::Size size, |
| 14 uint32_t texture_id, | 17 const TextureIds& texture_ids, |
| 15 uint32_t internal_texture_id) | 18 const TextureIds& internal_texture_ids) |
| 16 : id_(id), | 19 : id_(id), |
| 17 size_(size), | 20 size_(size), |
| 18 texture_id_(texture_id), | 21 texture_ids_(texture_ids), |
| 19 internal_texture_id_(internal_texture_id) {} | 22 internal_texture_ids_(internal_texture_ids) { |
| 23 DCHECK_EQ(texture_ids.size(), internal_texture_ids.size()); |
| 24 } |
| 20 | 25 |
| 21 PictureBuffer::PictureBuffer(int32_t id, | 26 PictureBuffer::PictureBuffer(int32_t id, |
| 22 gfx::Size size, | 27 gfx::Size size, |
| 23 uint32_t texture_id, | 28 const TextureIds& texture_ids, |
| 24 const gpu::Mailbox& texture_mailbox) | 29 const std::vector<gpu::Mailbox>& texture_mailboxes) |
| 25 : id_(id), | 30 : id_(id), |
| 26 size_(size), | 31 size_(size), |
| 27 texture_id_(texture_id), | 32 texture_ids_(texture_ids), |
| 28 internal_texture_id_(0), | 33 texture_mailboxes_(texture_mailboxes) { |
| 29 texture_mailbox_(texture_mailbox) {} | 34 DCHECK_EQ(texture_ids.size(), texture_mailboxes.size()); |
| 35 } |
| 36 |
| 37 PictureBuffer::~PictureBuffer() {} |
| 30 | 38 |
| 31 Picture::Picture(int32_t picture_buffer_id, | 39 Picture::Picture(int32_t picture_buffer_id, |
| 32 int32_t bitstream_buffer_id, | 40 int32_t bitstream_buffer_id, |
| 33 const gfx::Rect& visible_rect, | 41 const gfx::Rect& visible_rect, |
| 34 bool allow_overlay) | 42 bool allow_overlay) |
| 35 : picture_buffer_id_(picture_buffer_id), | 43 : picture_buffer_id_(picture_buffer_id), |
| 36 bitstream_buffer_id_(bitstream_buffer_id), | 44 bitstream_buffer_id_(bitstream_buffer_id), |
| 37 visible_rect_(visible_rect), | 45 visible_rect_(visible_rect), |
| 38 allow_overlay_(allow_overlay), | 46 allow_overlay_(allow_overlay), |
| 39 size_changed_(false) {} | 47 size_changed_(false) {} |
| 40 | 48 |
| 41 } // namespace media | 49 } // namespace media |
| OLD | NEW |