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 "base/macros.h" |
6 #include "media/video/picture.h" | 6 #include "media/video/picture.h" |
7 | 7 |
8 namespace media { | 8 namespace media { |
9 | 9 |
10 PictureBuffer::PictureBuffer(int32_t id, const gfx::Size& size) | 10 PictureBuffer::PictureBuffer(int32_t id, const gfx::Size& size) |
(...skipping 17 matching lines...) Expand all Loading... |
28 DCHECK(!service_texture_ids_.empty()); | 28 DCHECK(!service_texture_ids_.empty()); |
29 // We either not have client texture ids at all, or if we do, then their | 29 // We either not have client texture ids at all, or if we do, then their |
30 // number must be the same as the number of service texture ids. | 30 // number must be the same as the number of service texture ids. |
31 DCHECK(client_texture_ids_.empty() || | 31 DCHECK(client_texture_ids_.empty() || |
32 client_texture_ids_.size() == service_texture_ids_.size()); | 32 client_texture_ids_.size() == service_texture_ids_.size()); |
33 } | 33 } |
34 | 34 |
35 PictureBuffer::PictureBuffer(int32_t id, | 35 PictureBuffer::PictureBuffer(int32_t id, |
36 const gfx::Size& size, | 36 const gfx::Size& size, |
37 const TextureIds& client_texture_ids, | 37 const TextureIds& client_texture_ids, |
| 38 uint32_t texture_target, |
| 39 VideoPixelFormat pixel_format, |
38 const std::vector<gpu::Mailbox>& texture_mailboxes) | 40 const std::vector<gpu::Mailbox>& texture_mailboxes) |
39 : id_(id), | 41 : id_(id), |
40 size_(size), | 42 size_(size), |
41 client_texture_ids_(client_texture_ids), | 43 client_texture_ids_(client_texture_ids), |
| 44 texture_target_(texture_target), |
| 45 pixel_format_(pixel_format), |
42 texture_mailboxes_(texture_mailboxes) { | 46 texture_mailboxes_(texture_mailboxes) { |
43 DCHECK_EQ(client_texture_ids.size(), texture_mailboxes.size()); | 47 DCHECK_EQ(client_texture_ids.size(), texture_mailboxes.size()); |
44 } | 48 } |
45 | 49 |
46 PictureBuffer::PictureBuffer(const PictureBuffer& other) = default; | 50 PictureBuffer::PictureBuffer(const PictureBuffer& other) = default; |
47 | 51 |
48 PictureBuffer::~PictureBuffer() {} | 52 PictureBuffer::~PictureBuffer() {} |
49 | 53 |
50 gpu::Mailbox PictureBuffer::texture_mailbox(size_t plane) const { | 54 gpu::Mailbox PictureBuffer::texture_mailbox(size_t plane) const { |
51 if (plane >= texture_mailboxes_.size()) { | 55 if (plane >= texture_mailboxes_.size()) { |
(...skipping 16 matching lines...) Expand all Loading... |
68 allow_overlay_(allow_overlay), | 72 allow_overlay_(allow_overlay), |
69 size_changed_(false), | 73 size_changed_(false), |
70 surface_texture_(false), | 74 surface_texture_(false), |
71 wants_promotion_hint_(false) {} | 75 wants_promotion_hint_(false) {} |
72 | 76 |
73 Picture::Picture(const Picture& other) = default; | 77 Picture::Picture(const Picture& other) = default; |
74 | 78 |
75 Picture::~Picture() = default; | 79 Picture::~Picture() = default; |
76 | 80 |
77 } // namespace media | 81 } // namespace media |
OLD | NEW |