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

Side by Side Diff: media/video/picture.h

Issue 2462393002: Use texture ids passed from ARC as service ids in ArcGVDA (Closed)
Patch Set: Fixup DXVA Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « media/gpu/video_decode_accelerator_unittest.cc ('k') | media/video/picture.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "gpu/command_buffer/common/mailbox.h" 12 #include "gpu/command_buffer/common/mailbox.h"
13 #include "media/base/media_export.h" 13 #include "media/base/media_export.h"
14 #include "ui/gfx/color_space.h" 14 #include "ui/gfx/color_space.h"
15 #include "ui/gfx/geometry/rect.h" 15 #include "ui/gfx/geometry/rect.h"
16 #include "ui/gfx/geometry/size.h" 16 #include "ui/gfx/geometry/size.h"
17 17
18 namespace media { 18 namespace media {
19 19
20 // A picture buffer that is composed of one or more GLES2 textures. 20 // A picture buffer that is composed of one or more GLES2 textures.
21 // This is the media-namespace equivalent of PP_PictureBuffer_Dev. 21 // This is the media-namespace equivalent of PP_PictureBuffer_Dev.
22 class MEDIA_EXPORT PictureBuffer { 22 class MEDIA_EXPORT PictureBuffer {
23 public: 23 public:
24 using TextureIds = std::vector<uint32_t>; 24 using TextureIds = std::vector<uint32_t>;
25 25
26 PictureBuffer(int32_t id, const gfx::Size& size);
26 PictureBuffer(int32_t id, 27 PictureBuffer(int32_t id,
27 gfx::Size size, 28 const gfx::Size& size,
28 const TextureIds& client_texture_ids); 29 const TextureIds& client_texture_ids);
29 PictureBuffer(int32_t id, 30 PictureBuffer(int32_t id,
30 gfx::Size size, 31 const gfx::Size& size,
31 const TextureIds& client_texture_ids, 32 const TextureIds& client_texture_ids,
32 const TextureIds& service_texture_ids); 33 const TextureIds& service_texture_ids);
33 PictureBuffer(int32_t id, 34 PictureBuffer(int32_t id,
34 gfx::Size size, 35 const gfx::Size& size,
35 const TextureIds& client_texture_ids, 36 const TextureIds& client_texture_ids,
36 const std::vector<gpu::Mailbox>& texture_mailboxes); 37 const std::vector<gpu::Mailbox>& texture_mailboxes);
37 PictureBuffer(const PictureBuffer& other); 38 PictureBuffer(const PictureBuffer& other);
38 ~PictureBuffer(); 39 ~PictureBuffer();
39 40
40 // Returns the client-specified id of the buffer. 41 // Returns the client-specified id of the buffer.
41 int32_t id() const { return id_; } 42 int32_t id() const { return id_; }
42 43
43 // Returns the size of the buffer. 44 // Returns the size of the buffer.
44 gfx::Size size() const { return size_; } 45 gfx::Size size() const { return size_; }
45 46
46 void set_size(const gfx::Size& size) { size_ = size; } 47 void set_size(const gfx::Size& size) { size_ = size; }
47 48
48 // The client texture ids, i.e., those returned by Chrome's GL service. 49 // The client texture ids, i.e., those returned by Chrome's GL service.
49 const TextureIds& client_texture_ids() const { return client_texture_ids_; } 50 const TextureIds& client_texture_ids() const { return client_texture_ids_; }
50 51
51 // The service texture ids, i.e., the real platform ids corresponding to 52 // The service texture ids, i.e., the real platform ids corresponding to
52 // |client_texture_ids|. 53 // |client_texture_ids|.
53 const TextureIds& service_texture_ids() const { return service_texture_ids_; } 54 const TextureIds& service_texture_ids() const { return service_texture_ids_; }
54 55
55 const gpu::Mailbox& texture_mailbox(size_t plane) const { 56 gpu::Mailbox texture_mailbox(size_t plane) const;
56 return texture_mailboxes_[plane];
57 }
58 57
59 private: 58 private:
60 int32_t id_; 59 int32_t id_;
61 gfx::Size size_; 60 gfx::Size size_;
62 TextureIds client_texture_ids_; 61 TextureIds client_texture_ids_;
63 TextureIds service_texture_ids_; 62 TextureIds service_texture_ids_;
64 std::vector<gpu::Mailbox> texture_mailboxes_; 63 std::vector<gpu::Mailbox> texture_mailboxes_;
65 }; 64 };
66 65
67 // A decoded picture frame. 66 // A decoded picture frame.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 int32_t bitstream_buffer_id_; 108 int32_t bitstream_buffer_id_;
110 gfx::Rect visible_rect_; 109 gfx::Rect visible_rect_;
111 gfx::ColorSpace color_space_; 110 gfx::ColorSpace color_space_;
112 bool allow_overlay_; 111 bool allow_overlay_;
113 bool size_changed_; 112 bool size_changed_;
114 }; 113 };
115 114
116 } // namespace media 115 } // namespace media
117 116
118 #endif // MEDIA_VIDEO_PICTURE_H_ 117 #endif // MEDIA_VIDEO_PICTURE_H_
OLDNEW
« no previous file with comments | « media/gpu/video_decode_accelerator_unittest.cc ('k') | media/video/picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698