| OLD | NEW |
| (Empty) | |
| 1 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_IMAGE_BUFFER_H_ |
| 2 #define REMOTING_CLIENT_PLUGIN_PEPPER_IMAGE_BUFFER_H_ |
| 3 |
| 4 #include "remoting/client/image_buffer.h" |
| 5 |
| 6 #include "ppapi/cpp/image_data.h" |
| 7 #include "ppapi/cpp/size.h" |
| 8 |
| 9 namespace remoting { |
| 10 |
| 11 // ImageBuffer that uses PPAPI to allocate space for a raw image. |
| 12 class PepperImageBuffer : public ImageBuffer { |
| 13 public: |
| 14 // Constructor. |
| 15 PepperImageBuffer(const pp::InstanceHandle& instance, int width, int height); |
| 16 |
| 17 // ImageBuffer implementation: |
| 18 virtual bool is_null() OVERRIDE; |
| 19 virtual uint8* data() OVERRIDE; |
| 20 virtual int width() OVERRIDE; |
| 21 virtual int height() OVERRIDE; |
| 22 virtual int32 stride() OVERRIDE; |
| 23 |
| 24 // Provides access to the underlying PPAPI object. |
| 25 const pp::ImageData& data_object(); |
| 26 |
| 27 private: |
| 28 // Size of the image (used only for construction of data_). |
| 29 pp::Size size_; |
| 30 |
| 31 // Underlying PPAPI image that's actually responsible for everything. |
| 32 pp::ImageData data_; |
| 33 }; |
| 34 |
| 35 } // namespace remoting |
| 36 |
| 37 #endif |
| OLD | NEW |