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

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

Issue 6901036: Update VideoDecode PPAPI structs to be consistent with media structures, part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: a few minor clean-ups Created 9 years, 7 months 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 | Annotate | Revision Log
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 #include "media/video/picture.h" 5 #include "media/video/picture.h"
6 6
7 namespace media { 7 namespace media {
8 8
Ami GONE FROM CHROMIUM 2011/05/03 23:34:47 Add a comment pointing to the far-away implementat
scherkus (not reviewing) 2011/05/04 00:03:28 woah there are far away implementations!?
vrk (LEFT CHROMIUM) 2011/05/05 05:57:12 Done.
vrk (LEFT CHROMIUM) 2011/05/05 05:57:12 The other constructors (e.g. BufferInfo(const PP_B
9 // PictureBuffer implementation. 9 BufferInfo::BufferInfo(int32 id, gfx::Size size)
10 PictureBuffer::PictureBuffer(int32 id, 10 : id_(id),
scherkus (not reviewing) 2011/05/04 00:03:28 should be indented by 2 more spaces
vrk (LEFT CHROMIUM) 2011/05/05 05:57:12 Done.
11 gfx::Size pixel_size, 11 size_(size) {
12 std::vector<uint32> color_format,
13 MemoryType memory_type,
14 std::vector<DataPlaneHandle> data_plane_handles)
15 : id_(id),
16 pixel_size_(pixel_size),
17 color_format_(color_format),
18 memory_type_(memory_type),
19 data_plane_handles_(data_plane_handles) {
20 } 12 }
21 13
22 PictureBuffer::~PictureBuffer() {} 14 GLESBuffer::GLESBuffer(
23 15 int32 id, gfx::Size size, uint32 texture_id, uint32 context_id)
24 int32 PictureBuffer::GetId() { 16 : texture_id_(texture_id),
25 return id_; 17 context_id_(context_id),
18 info_(id, size) {
26 } 19 }
27 20
28 gfx::Size PictureBuffer::GetSize() { 21 SysmemBuffer::SysmemBuffer(int32 id, gfx::Size size, void* data)
29 return pixel_size_; 22 : data_(data),
scherkus (not reviewing) 2011/05/04 00:03:28 should be indented by 2 more spaces
vrk (LEFT CHROMIUM) 2011/05/05 05:57:12 Done.
30 } 23 info_(id, size) {
31
32 const std::vector<uint32>& PictureBuffer::GetColorFormat() {
33 return color_format_;
34 }
35
36 PictureBuffer::MemoryType PictureBuffer::GetMemoryType() {
37 return memory_type_;
38 }
39
40 std::vector<PictureBuffer::DataPlaneHandle>& PictureBuffer::GetPlaneHandles() {
41 return data_plane_handles_;
42 }
43
44 // Picture implementation.
45 Picture::Picture(PictureBuffer* picture_buffer, gfx::Size decoded_pixel_size,
46 gfx::Size visible_pixel_size, void* user_handle)
47 : picture_buffer_(picture_buffer),
48 decoded_pixel_size_(decoded_pixel_size),
49 visible_pixel_size_(visible_pixel_size),
50 user_handle_(user_handle) {
51 }
52
53 Picture::~Picture() {}
54
55 PictureBuffer* Picture::picture_buffer() {
56 return picture_buffer_;
57 }
58
59 gfx::Size Picture::GetDecodedSize() const {
60 return decoded_pixel_size_;
61 }
62
63 gfx::Size Picture::GetVisibleSize() const {
64 return visible_pixel_size_;
65 }
66
67 void* Picture::GetUserHandle() {
68 return user_handle_;
69 } 24 }
70 25
71 } // namespace media 26 } // namespace media
72
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698