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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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> indentifying 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 the | 54 /// image data formats. Refer to |
55 /// <a href="/chrome/nativeclient/docs/reference/pepperc/ | 55 /// <a href="../pepperc/ppb__image__data_8h.html"> |
56 /// ppb__image__data_8h.html"><code>ppb_image_data.h</code></a> for further | 56 /// <code>ppb_image_data.h</code></a> for further information. |
57 /// information. | |
58 /// | 57 /// |
59 /// @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 |
60 /// size. | 59 /// size. |
61 /// | 60 /// |
62 /// @param[in] init_to_zero A bool used to determine transparency at | 61 /// @param[in] init_to_zero A bool used to determine transparency at |
63 /// creation. Set the <code>init_to_zero</code> flag if you want the bitmap | 62 /// creation. Set the <code>init_to_zero</code> flag if you want the bitmap |
64 /// initialized to transparent during the creation process. If this flag is | 63 /// initialized to transparent during the creation process. If this flag is |
65 /// not set, the current contents of the bitmap will be undefined, and the | 64 /// not set, the current contents of the bitmap will be undefined, and the |
66 /// module should be sure to set all the pixels. | 65 /// module should be sure to set all the pixels. |
67 ImageData(Instance* instance, | 66 ImageData(Instance* instance, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 private: | 126 private: |
128 void PassRefAndInitData(PP_Resource resource); | 127 void PassRefAndInitData(PP_Resource resource); |
129 | 128 |
130 PP_ImageDataDesc desc_; | 129 PP_ImageDataDesc desc_; |
131 void* data_; | 130 void* data_; |
132 }; | 131 }; |
133 | 132 |
134 } // namespace pp | 133 } // namespace pp |
135 | 134 |
136 #endif // PPAPI_CPP_IMAGE_DATA_H_ | 135 #endif // PPAPI_CPP_IMAGE_DATA_H_ |
OLD | NEW |