| 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 /** | 6 /** |
| 7 * This file defines the <code>PPB_ImageData</code> struct for determining how | 7 * This file defines the <code>PPB_ImageData</code> struct for determining how |
| 8 * a browser handles image data. | 8 * a browser handles image data. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 PP_Bool IsImageDataFormatSupported( | 101 PP_Bool IsImageDataFormatSupported( |
| 102 [in] PP_ImageDataFormat format); | 102 [in] PP_ImageDataFormat format); |
| 103 | 103 |
| 104 /** | 104 /** |
| 105 * Create() allocates an image data resource with the given format and size. | 105 * Create() allocates an image data resource with the given format and size. |
| 106 * | 106 * |
| 107 * For security reasons, if uninitialized, the bitmap will not contain random | 107 * For security reasons, if uninitialized, the bitmap will not contain random |
| 108 * memory, but may contain data from a previous image produced by the same | 108 * memory, but may contain data from a previous image produced by the same |
| 109 * module if the bitmap was cached and re-used. | 109 * module if the bitmap was cached and re-used. |
| 110 * | 110 * |
| 111 * @param[in] instance A <code>PP_Instance</code> indentifying one instance | 111 * @param[in] instance A <code>PP_Instance</code> identifying one instance |
| 112 * of a module. | 112 * of a module. |
| 113 * @param[in] format The desired image data format. | 113 * @param[in] format The desired image data format. |
| 114 * @param[in] size A pointer to a <code>PP_Size</code> containing the image | 114 * @param[in] size A pointer to a <code>PP_Size</code> containing the image |
| 115 * size. | 115 * size. |
| 116 * @param[in] init_to_zero A <code>PP_Bool</code> to determine transparency | 116 * @param[in] init_to_zero A <code>PP_Bool</code> to determine transparency |
| 117 * at creation. | 117 * at creation. |
| 118 * Set the <code>init_to_zero</code> flag if you want the bitmap initialized | 118 * Set the <code>init_to_zero</code> flag if you want the bitmap initialized |
| 119 * to transparent during the creation process. If this flag is not set, the | 119 * to transparent during the creation process. If this flag is not set, the |
| 120 * current contents of the bitmap will be undefined, and the module should | 120 * current contents of the bitmap will be undefined, and the module should |
| 121 * be sure to set all the pixels. | 121 * be sure to set all the pixels. |
| 122 * | 122 * |
| 123 * @return A <code>PP_Resource</code> with a nonzero ID on succes or zero on | 123 * @return A <code>PP_Resource</code> with a nonzero ID on success or zero on |
| 124 * failure. Failure means the instance, image size, or format was invalid. | 124 * failure. Failure means the instance, image size, or format was invalid. |
| 125 */ | 125 */ |
| 126 PP_Resource Create( | 126 PP_Resource Create( |
| 127 [in] PP_Instance instance, | 127 [in] PP_Instance instance, |
| 128 [in] PP_ImageDataFormat format, | 128 [in] PP_ImageDataFormat format, |
| 129 [in] PP_Size size, | 129 [in] PP_Size size, |
| 130 [in] PP_Bool init_to_zero); | 130 [in] PP_Bool init_to_zero); |
| 131 | 131 |
| 132 /** | 132 /** |
| 133 * IsImageData() determiens if a given resource is image data. | 133 * IsImageData() determiens if a given resource is image data. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 * Unmap is a pointer to a function that unmaps an image data from the module | 175 * Unmap is a pointer to a function that unmaps an image data from the module |
| 176 * address space. | 176 * address space. |
| 177 * | 177 * |
| 178 * @param[in] image_data A <code>PP_Resource</code> corresponding to image | 178 * @param[in] image_data A <code>PP_Resource</code> corresponding to image |
| 179 * data. | 179 * data. |
| 180 */ | 180 */ |
| 181 void Unmap( | 181 void Unmap( |
| 182 [in] PP_Resource image_data); | 182 [in] PP_Resource image_data); |
| 183 }; | 183 }; |
| 184 | 184 |
| OLD | NEW |