| 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 PPAPI_CPP_IMAGE_DATA_H_ | 5 #ifndef PPAPI_CPP_IMAGE_DATA_H_ |
| 6 #define PPAPI_CPP_IMAGE_DATA_H_ | 6 #define PPAPI_CPP_IMAGE_DATA_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/ppb_image_data.h" | 8 #include "ppapi/c/ppb_image_data.h" |
| 9 #include "ppapi/cpp/point.h" | 9 #include "ppapi/cpp/point.h" |
| 10 #include "ppapi/cpp/size.h" | 10 #include "ppapi/cpp/size.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 class ImageData : public Resource { | 22 class ImageData : public Resource { |
| 23 public: | 23 public: |
| 24 /// Default constructor for creating an is_null() <code>ImageData</code> | 24 /// Default constructor for creating an is_null() <code>ImageData</code> |
| 25 /// object. | 25 /// object. |
| 26 ImageData(); | 26 ImageData(); |
| 27 | 27 |
| 28 /// A special structure used by the constructor that does not increment the | 28 /// A special structure used by the constructor that does not increment the |
| 29 /// reference count of the underlying Image resource. | 29 /// reference count of the underlying Image resource. |
| 30 struct PassRef {}; | 30 struct PassRef {}; |
| 31 | 31 |
| 32 /// A constructor used when you have received a PP_Resource as a return | 32 /// A constructor used when you have received a <code>PP_Resource</code> as a |
| 33 /// value that has already been reference counted. | 33 /// return value that has already been reference counted. |
| 34 /// | 34 /// |
| 35 /// @param[in] resource A PP_Resource corresponding to image data. | 35 /// @param[in] resource A PP_Resource corresponding to image data. |
| 36 ImageData(PassRef, PP_Resource resource); | 36 ImageData(PassRef, PP_Resource resource); |
| 37 | 37 |
| 38 /// The copy constructor for <code>ImageData</code>. This constructor | 38 /// The copy constructor for <code>ImageData</code>. This constructor |
| 39 /// produces an <code>ImageData</code> object that shares the underlying | 39 /// produces an <code>ImageData</code> object that shares the underlying |
| 40 /// <code>Image</code> resource with <code>other</code>. | 40 /// <code>Image</code> resource with <code>other</code>. |
| 41 /// | 41 /// |
| 42 /// @param[in] other A pointer to an image data. | 42 /// @param[in] other A pointer to an image data. |
| 43 ImageData(const ImageData& other); | 43 ImageData(const ImageData& other); |
| 44 | 44 |
| 45 /// A constructor that allocates a new <code>ImageData</code> in the browser | 45 /// A constructor that allocates a new <code>ImageData</code> in the browser |
| 46 /// with the provided parameters. The resulting object will be is_null() if | 46 /// with the provided parameters. The resulting object will be is_null() if |
| 47 /// the allocation failed. | 47 /// the allocation failed. |
| 48 /// | 48 /// |
| 49 /// @param[in] instance A <code>PP_Instance</code> indentifying one instance | 49 /// @param[in] instance A <code>PP_Instance</code> identifying one instance |
| 50 /// of a module. | 50 /// of a module. |
| 51 /// | 51 /// |
| 52 /// @param[in] format A PP_ImageDataFormat containing desired image format. | 52 /// @param[in] format A PP_ImageDataFormat containing desired image format. |
| 53 /// PP_ImageDataFormat is an enumeration of the different types of | 53 /// PP_ImageDataFormat is an enumeration of the different types of |
| 54 /// image data formats. Refer to | 54 /// image data formats. Refer to |
| 55 /// <a href="../pepperc/ppb__image__data_8h.html"> | 55 /// <a href="../pepperc/ppb__image__data_8h.html"> |
| 56 /// <code>ppb_image_data.h</code></a> for further information. | 56 /// <code>ppb_image_data.h</code></a> for further information. |
| 57 /// | 57 /// |
| 58 /// @param[in] size A pointer to a <code>Size</code> containing the image | 58 /// @param[in] size A pointer to a <code>Size</code> containing the image |
| 59 /// size. | 59 /// size. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 private: | 126 private: |
| 127 void PassRefAndInitData(PP_Resource resource); | 127 void PassRefAndInitData(PP_Resource resource); |
| 128 | 128 |
| 129 PP_ImageDataDesc desc_; | 129 PP_ImageDataDesc desc_; |
| 130 void* data_; | 130 void* data_; |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 } // namespace pp | 133 } // namespace pp |
| 134 | 134 |
| 135 #endif // PPAPI_CPP_IMAGE_DATA_H_ | 135 #endif // PPAPI_CPP_IMAGE_DATA_H_ |
| OLD | NEW |