OLD | NEW |
1 /* Copyright 2014 The Chromium Authors. All rights reserved. | 1 /* Copyright 2014 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 [generate_thunk] | 6 [generate_thunk] |
7 | 7 |
8 label Chrome { | 8 label Chrome { |
9 [channel=dev] M37 = 0.1 | 9 [channel=dev] M37 = 0.1, |
| 10 [channel=dev] M38 = 0.2 |
10 }; | 11 }; |
11 | 12 |
12 /** | 13 /** |
13 * This enumeration contains blend modes used for computing the result pixels | 14 * This enumeration contains blend modes used for computing the result pixels |
14 * based on the source RGBA values in layers with the RGBA values that are | 15 * based on the source RGBA values in layers with the RGBA values that are |
15 * already in the destination framebuffer. | 16 * already in the destination framebuffer. |
16 * alpha_src, color_src: source alpha and color. | 17 * alpha_src, color_src: source alpha and color. |
17 * alpha_dst, color_dst: destination alpha and color (before compositing). | 18 * alpha_dst, color_dst: destination alpha and color (before compositing). |
18 * Below descriptions of the blend modes assume the colors are pre-multiplied. | 19 * Below descriptions of the blend modes assume the colors are pre-multiplied. |
19 * This interface is still in development (Dev API status) and may change, | 20 * This interface is still in development (Dev API status) and may change, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 * | 102 * |
102 * @return An int32_t containing a result code from <code>pp_errors.h</code>. | 103 * @return An int32_t containing a result code from <code>pp_errors.h</code>. |
103 */ | 104 */ |
104 int32_t SetTexture([in] PP_Resource layer, | 105 int32_t SetTexture([in] PP_Resource layer, |
105 [in] PP_Resource context, | 106 [in] PP_Resource context, |
106 [in] uint32_t texture, | 107 [in] uint32_t texture, |
107 [in] PP_Size size, | 108 [in] PP_Size size, |
108 [in] PP_CompletionCallback cc); | 109 [in] PP_CompletionCallback cc); |
109 | 110 |
110 /** | 111 /** |
| 112 * Sets the texture of a texture layer. If the layer is uninitialized, |
| 113 * it will initialize the layer first, and then set its texture. |
| 114 * The source rect will be set to ((0, 0), (1, 1)). If the layer has been |
| 115 * initialized to another kind of layer, the layer will not be changed, |
| 116 * and <code>PP_ERROR_BADARGUMENT</code> will be returned. |
| 117 * |
| 118 * param[in] layer A <code>PP_Resource</code> corresponding to a compositor |
| 119 * layer resource. |
| 120 * param[in] context A <code>PP_Resource</code> corresponding to a graphics |
| 121 * 3d resource which owns the GL texture. |
| 122 * param[in] target GL texture target (GL_TEXTURE_2D, etc). |
| 123 * param[in] texture A GL texture object id. |
| 124 * param[in] size A <code>PP_Size</code> for the size of the layer before |
| 125 * transform. |
| 126 * param[in] cc A <code>PP_CompletionCallback</code> to be called when |
| 127 * the texture is released by Chromium compositor. |
| 128 * |
| 129 * @return An int32_t containing a result code from <code>pp_errors.h</code>. |
| 130 */ |
| 131 [version = 0.2] |
| 132 int32_t SetTexture([in] PP_Resource layer, |
| 133 [in] PP_Resource context, |
| 134 [in] uint32_t target, |
| 135 [in] uint32_t texture, |
| 136 [in] PP_Size size, |
| 137 [in] PP_CompletionCallback cc); |
| 138 |
| 139 /** |
111 * Sets the image of an image layer. If the layer is uninitialized, | 140 * Sets the image of an image layer. If the layer is uninitialized, |
112 * it will initialize the layer first, and then set its image. | 141 * it will initialize the layer first, and then set its image. |
113 * The layer size will be set to the image's size. The source rect will be set | 142 * The layer size will be set to the image's size. The source rect will be set |
114 * to the full image. If the layer has been initialized to another kind of | 143 * to the full image. If the layer has been initialized to another kind of |
115 * layer, the layer will not be changed, and <code>PP_ERROR_BADARGUMENT</code> | 144 * layer, the layer will not be changed, and <code>PP_ERROR_BADARGUMENT</code> |
116 * will be returned. | 145 * will be returned. |
117 * | 146 * |
118 * param[in] layer A <code>PP_Resource</code> corresponding to a compositor | 147 * param[in] layer A <code>PP_Resource</code> corresponding to a compositor |
119 * layer resource. | 148 * layer resource. |
120 * param[in] image_data A <code>PP_Resource</code> corresponding to | 149 * param[in] image_data A <code>PP_Resource</code> corresponding to |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 * param[in] layer A <code>PP_Resource</code> corresponding to a compositor | 242 * param[in] layer A <code>PP_Resource</code> corresponding to a compositor |
214 * layer resource. | 243 * layer resource. |
215 * param[in] premult A <code>PP_Bool</code> with <code>PP_TRUE</code> if | 244 * param[in] premult A <code>PP_Bool</code> with <code>PP_TRUE</code> if |
216 * pre-multiplied alpha is used. | 245 * pre-multiplied alpha is used. |
217 * | 246 * |
218 * @return An int32_t containing a result code from <code>pp_errors.h</code>. | 247 * @return An int32_t containing a result code from <code>pp_errors.h</code>. |
219 */ | 248 */ |
220 int32_t SetPremultipliedAlpha([in] PP_Resource layer, | 249 int32_t SetPremultipliedAlpha([in] PP_Resource layer, |
221 [in] PP_Bool premult); | 250 [in] PP_Bool premult); |
222 }; | 251 }; |
OLD | NEW |