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

Side by Side Diff: remoting/client/plugin/pepper_image_buffer.cc

Issue 18233015: Abstract PPAPI's ImageData behind webrtc::DesktopFrame interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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
OLDNEW
(Empty)
1 #include "remoting/client/plugin/pepper_image_buffer.h"
2
3 using pp::ImageData;
4
5 namespace remoting {
6
7 PepperImageBuffer::PepperImageBuffer(const pp::InstanceHandle& instance,
8 int width,
9 int height)
10 : size_(width, height),
11 data_(instance, PP_IMAGEDATAFORMAT_BGRA_PREMUL, size_, false) {}
12
13 bool PepperImageBuffer::is_null() {
14 return data_.is_null();
15 }
16
17 uint8* PepperImageBuffer::data() {
18 return reinterpret_cast<uint8*>(data_.data());
19 }
20
21 int PepperImageBuffer::width() {
22 return data_.size().width();
23 }
24
25 int PepperImageBuffer::height() {
26 return data_.size().height();
27 }
28
29 int32 PepperImageBuffer::stride() {
30 return data_.stride();
31 }
32
33 const ImageData& PepperImageBuffer::data_object() {
34 return data_;
35 }
36
37 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698