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 | 5 |
6 /* From ppb_image_data.idl modified Wed Aug 24 20:50:01 2011. */ | 6 /* From ppb_image_data.idl modified Mon Aug 29 10:11:34 2011. */ |
7 | 7 |
8 #ifndef PPAPI_C_PPB_IMAGE_DATA_H_ | 8 #ifndef PPAPI_C_PPB_IMAGE_DATA_H_ |
9 #define PPAPI_C_PPB_IMAGE_DATA_H_ | 9 #define PPAPI_C_PPB_IMAGE_DATA_H_ |
10 | 10 |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
14 #include "ppapi/c/pp_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
15 #include "ppapi/c/pp_size.h" | 15 #include "ppapi/c/pp_size.h" |
16 #include "ppapi/c/pp_stdint.h" | 16 #include "ppapi/c/pp_stdint.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 * image data format is supported by the browser. | 125 * image data format is supported by the browser. |
126 */ | 126 */ |
127 PP_Bool (*IsImageDataFormatSupported)(PP_ImageDataFormat format); | 127 PP_Bool (*IsImageDataFormatSupported)(PP_ImageDataFormat format); |
128 /** | 128 /** |
129 * Create() allocates an image data resource with the given format and size. | 129 * Create() allocates an image data resource with the given format and size. |
130 * | 130 * |
131 * For security reasons, if uninitialized, the bitmap will not contain random | 131 * For security reasons, if uninitialized, the bitmap will not contain random |
132 * memory, but may contain data from a previous image produced by the same | 132 * memory, but may contain data from a previous image produced by the same |
133 * module if the bitmap was cached and re-used. | 133 * module if the bitmap was cached and re-used. |
134 * | 134 * |
135 * @param[in] instance A <code>PP_Instance</code> indentifying one instance | 135 * @param[in] instance A <code>PP_Instance</code> identifying one instance |
136 * of a module. | 136 * of a module. |
137 * @param[in] format The desired image data format. | 137 * @param[in] format The desired image data format. |
138 * @param[in] size A pointer to a <code>PP_Size</code> containing the image | 138 * @param[in] size A pointer to a <code>PP_Size</code> containing the image |
139 * size. | 139 * size. |
140 * @param[in] init_to_zero A <code>PP_Bool</code> to determine transparency | 140 * @param[in] init_to_zero A <code>PP_Bool</code> to determine transparency |
141 * at creation. | 141 * at creation. |
142 * Set the <code>init_to_zero</code> flag if you want the bitmap initialized | 142 * Set the <code>init_to_zero</code> flag if you want the bitmap initialized |
143 * to transparent during the creation process. If this flag is not set, the | 143 * to transparent during the creation process. If this flag is not set, the |
144 * current contents of the bitmap will be undefined, and the module should | 144 * current contents of the bitmap will be undefined, and the module should |
145 * be sure to set all the pixels. | 145 * be sure to set all the pixels. |
146 * | 146 * |
147 * @return A <code>PP_Resource</code> with a nonzero ID on succes or zero on | 147 * @return A <code>PP_Resource</code> with a nonzero ID on success or zero on |
148 * failure. Failure means the instance, image size, or format was invalid. | 148 * failure. Failure means the instance, image size, or format was invalid. |
149 */ | 149 */ |
150 PP_Resource (*Create)(PP_Instance instance, | 150 PP_Resource (*Create)(PP_Instance instance, |
151 PP_ImageDataFormat format, | 151 PP_ImageDataFormat format, |
152 const struct PP_Size* size, | 152 const struct PP_Size* size, |
153 PP_Bool init_to_zero); | 153 PP_Bool init_to_zero); |
154 /** | 154 /** |
155 * IsImageData() determiens if a given resource is image data. | 155 * IsImageData() determiens if a given resource is image data. |
156 * | 156 * |
157 * @param[in] image_data A <code>PP_Resource</code> corresponding to image | 157 * @param[in] image_data A <code>PP_Resource</code> corresponding to image |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 * data. | 194 * data. |
195 */ | 195 */ |
196 void (*Unmap)(PP_Resource image_data); | 196 void (*Unmap)(PP_Resource image_data); |
197 }; | 197 }; |
198 /** | 198 /** |
199 * @} | 199 * @} |
200 */ | 200 */ |
201 | 201 |
202 #endif /* PPAPI_C_PPB_IMAGE_DATA_H_ */ | 202 #endif /* PPAPI_C_PPB_IMAGE_DATA_H_ */ |
203 | 203 |
OLD | NEW |