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 #ifndef MEDIA_VIDEO_PICTURE_H_ | 5 #ifndef MEDIA_VIDEO_PICTURE_H_ |
6 #define MEDIA_VIDEO_PICTURE_H_ | 6 #define MEDIA_VIDEO_PICTURE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "gpu/command_buffer/common/mailbox.h" | 9 #include "gpu/command_buffer/common/mailbox.h" |
10 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
11 #include "ui/gfx/geometry/rect.h" | 11 #include "ui/gfx/geometry/rect.h" |
12 #include "ui/gfx/geometry/size.h" | 12 #include "ui/gfx/geometry/size.h" |
13 | 13 |
14 namespace media { | 14 namespace media { |
15 | 15 |
16 // A picture buffer that is composed of a GLES2 texture. | 16 // A picture buffer that is composed of a GLES2 texture. |
17 // This is the media-namespace equivalent of PP_PictureBuffer_Dev. | 17 // This is the media-namespace equivalent of PP_PictureBuffer_Dev. |
18 class MEDIA_EXPORT PictureBuffer { | 18 class MEDIA_EXPORT PictureBuffer { |
19 public: | 19 public: |
20 PictureBuffer(int32 id, gfx::Size size, uint32 texture_id); | 20 PictureBuffer(int32 id, gfx::Size size, uint32 texture_id); |
21 PictureBuffer(int32 id, | 21 PictureBuffer(int32 id, |
22 gfx::Size size, | 22 gfx::Size size, |
23 uint32 texture_id, | 23 uint32 texture_id, |
| 24 uint32 internal_texture_id); |
| 25 PictureBuffer(int32 id, |
| 26 gfx::Size size, |
| 27 uint32 texture_id, |
24 const gpu::Mailbox& texture_mailbox); | 28 const gpu::Mailbox& texture_mailbox); |
25 | 29 |
26 // Returns the client-specified id of the buffer. | 30 // Returns the client-specified id of the buffer. |
27 int32 id() const { | 31 int32 id() const { |
28 return id_; | 32 return id_; |
29 } | 33 } |
30 | 34 |
31 // Returns the size of the buffer. | 35 // Returns the size of the buffer. |
32 gfx::Size size() const { | 36 gfx::Size size() const { |
33 return size_; | 37 return size_; |
34 } | 38 } |
35 | 39 |
36 // Returns the id of the texture. | 40 // Returns the id of the texture. |
37 // NOTE: The texture id in the renderer process corresponds to a different | 41 // NOTE: The texture id in the renderer process corresponds to a different |
38 // texture id in the GPU process. | 42 // texture id in the GPU process. |
39 uint32 texture_id() const { | 43 uint32 texture_id() const { |
40 return texture_id_; | 44 return texture_id_; |
41 } | 45 } |
42 | 46 |
| 47 uint32 internal_texture_id() const { return internal_texture_id_; } |
| 48 |
43 const gpu::Mailbox& texture_mailbox() const { | 49 const gpu::Mailbox& texture_mailbox() const { |
44 return texture_mailbox_; | 50 return texture_mailbox_; |
45 } | 51 } |
46 | 52 |
47 private: | 53 private: |
48 int32 id_; | 54 int32 id_; |
49 gfx::Size size_; | 55 gfx::Size size_; |
50 uint32 texture_id_; | 56 uint32 texture_id_; |
| 57 uint32 internal_texture_id_; |
51 gpu::Mailbox texture_mailbox_; | 58 gpu::Mailbox texture_mailbox_; |
52 }; | 59 }; |
53 | 60 |
54 // A decoded picture frame. | 61 // A decoded picture frame. |
55 // This is the media-namespace equivalent of PP_Picture_Dev. | 62 // This is the media-namespace equivalent of PP_Picture_Dev. |
56 class MEDIA_EXPORT Picture { | 63 class MEDIA_EXPORT Picture { |
57 public: | 64 public: |
58 Picture(int32 picture_buffer_id, | 65 Picture(int32 picture_buffer_id, |
59 int32 bitstream_buffer_id, | 66 int32 bitstream_buffer_id, |
60 const gfx::Rect& visible_rect); | 67 const gfx::Rect& visible_rect); |
(...skipping 19 matching lines...) Expand all Loading... |
80 | 87 |
81 private: | 88 private: |
82 int32 picture_buffer_id_; | 89 int32 picture_buffer_id_; |
83 int32 bitstream_buffer_id_; | 90 int32 bitstream_buffer_id_; |
84 gfx::Rect visible_rect_; | 91 gfx::Rect visible_rect_; |
85 }; | 92 }; |
86 | 93 |
87 } // namespace media | 94 } // namespace media |
88 | 95 |
89 #endif // MEDIA_VIDEO_PICTURE_H_ | 96 #endif // MEDIA_VIDEO_PICTURE_H_ |
OLD | NEW |