| 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 /* From ppb_compositor_layer.idl modified Wed Jun 4 11:17:54 2014. */ | 6 /* From ppb_compositor_layer.idl modified Thu Aug 14 18:06:33 2014. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PPB_COMPOSITOR_LAYER_H_ | 8 #ifndef PPAPI_C_PPB_COMPOSITOR_LAYER_H_ |
| 9 #define PPAPI_C_PPB_COMPOSITOR_LAYER_H_ | 9 #define PPAPI_C_PPB_COMPOSITOR_LAYER_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
| 13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
| 14 #include "ppapi/c/pp_point.h" | 14 #include "ppapi/c/pp_point.h" |
| 15 #include "ppapi/c/pp_rect.h" | 15 #include "ppapi/c/pp_rect.h" |
| 16 #include "ppapi/c/pp_resource.h" | 16 #include "ppapi/c/pp_resource.h" |
| 17 #include "ppapi/c/pp_size.h" | 17 #include "ppapi/c/pp_size.h" |
| 18 #include "ppapi/c/pp_stdint.h" | 18 #include "ppapi/c/pp_stdint.h" |
| 19 | 19 |
| 20 #define PPB_COMPOSITORLAYER_INTERFACE_0_1 "PPB_CompositorLayer;0.1" /* dev */ | 20 #define PPB_COMPOSITORLAYER_INTERFACE_0_1 "PPB_CompositorLayer;0.1" /* dev */ |
| 21 #define PPB_COMPOSITORLAYER_INTERFACE_0_2 "PPB_CompositorLayer;0.2" /* dev */ |
| 21 /** | 22 /** |
| 22 * @file | 23 * @file |
| 23 */ | 24 */ |
| 24 | 25 |
| 25 | 26 |
| 26 /** | 27 /** |
| 27 * @addtogroup Enums | 28 * @addtogroup Enums |
| 28 * @{ | 29 * @{ |
| 29 */ | 30 */ |
| 30 /** | 31 /** |
| (...skipping 27 matching lines...) Expand all Loading... |
| 58 */ | 59 */ |
| 59 | 60 |
| 60 /** | 61 /** |
| 61 * @addtogroup Interfaces | 62 * @addtogroup Interfaces |
| 62 * @{ | 63 * @{ |
| 63 */ | 64 */ |
| 64 /** | 65 /** |
| 65 * Defines the <code>PPB_CompositorLayer</code> interface. It is used by | 66 * Defines the <code>PPB_CompositorLayer</code> interface. It is used by |
| 66 * <code>PPB_Compositor</code>. | 67 * <code>PPB_Compositor</code>. |
| 67 */ | 68 */ |
| 68 struct PPB_CompositorLayer_0_1 { /* dev */ | 69 struct PPB_CompositorLayer_0_2 { /* dev */ |
| 69 /** | 70 /** |
| 70 * Determines if a resource is a compositor layer resource. | 71 * Determines if a resource is a compositor layer resource. |
| 71 * | 72 * |
| 72 * @param[in] resource The <code>PP_Resource</code> to test. | 73 * @param[in] resource The <code>PP_Resource</code> to test. |
| 73 * | 74 * |
| 74 * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given | 75 * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given |
| 75 * resource is a compositor layer resource or <code>PP_FALSE</code> | 76 * resource is a compositor layer resource or <code>PP_FALSE</code> |
| 76 * otherwise. | 77 * otherwise. |
| 77 */ | 78 */ |
| 78 PP_Bool (*IsCompositorLayer)(PP_Resource resource); | 79 PP_Bool (*IsCompositorLayer)(PP_Resource resource); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 107 * Sets the texture of a texture layer. If the layer is uninitialized, | 108 * Sets the texture of a texture layer. If the layer is uninitialized, |
| 108 * it will initialize the layer first, and then set its texture. | 109 * it will initialize the layer first, and then set its texture. |
| 109 * The source rect will be set to ((0, 0), (1, 1)). If the layer has been | 110 * The source rect will be set to ((0, 0), (1, 1)). If the layer has been |
| 110 * initialized to another kind of layer, the layer will not be changed, | 111 * initialized to another kind of layer, the layer will not be changed, |
| 111 * and <code>PP_ERROR_BADARGUMENT</code> will be returned. | 112 * and <code>PP_ERROR_BADARGUMENT</code> will be returned. |
| 112 * | 113 * |
| 113 * param[in] layer A <code>PP_Resource</code> corresponding to a compositor | 114 * param[in] layer A <code>PP_Resource</code> corresponding to a compositor |
| 114 * layer resource. | 115 * layer resource. |
| 115 * param[in] context A <code>PP_Resource</code> corresponding to a graphics | 116 * param[in] context A <code>PP_Resource</code> corresponding to a graphics |
| 116 * 3d resource which owns the GL texture. | 117 * 3d resource which owns the GL texture. |
| 118 * param[in] target GL texture target (GL_TEXTURE_2D, etc). |
| 117 * param[in] texture A GL texture object id. | 119 * param[in] texture A GL texture object id. |
| 118 * param[in] size A <code>PP_Size</code> for the size of the layer before | 120 * param[in] size A <code>PP_Size</code> for the size of the layer before |
| 119 * transform. | 121 * transform. |
| 120 * param[in] cc A <code>PP_CompletionCallback</code> to be called when | 122 * param[in] cc A <code>PP_CompletionCallback</code> to be called when |
| 121 * the texture is released by Chromium compositor. | 123 * the texture is released by Chromium compositor. |
| 122 * | 124 * |
| 123 * @return An int32_t containing a result code from <code>pp_errors.h</code>. | 125 * @return An int32_t containing a result code from <code>pp_errors.h</code>. |
| 124 */ | 126 */ |
| 125 int32_t (*SetTexture)(PP_Resource layer, | 127 int32_t (*SetTexture)(PP_Resource layer, |
| 126 PP_Resource context, | 128 PP_Resource context, |
| 129 uint32_t target, |
| 127 uint32_t texture, | 130 uint32_t texture, |
| 128 const struct PP_Size* size, | 131 const struct PP_Size* size, |
| 129 struct PP_CompletionCallback cc); | 132 struct PP_CompletionCallback cc); |
| 130 /** | 133 /** |
| 131 * Sets the image of an image layer. If the layer is uninitialized, | 134 * Sets the image of an image layer. If the layer is uninitialized, |
| 132 * it will initialize the layer first, and then set its image. | 135 * it will initialize the layer first, and then set its image. |
| 133 * The layer size will be set to the image's size. The source rect will be set | 136 * The layer size will be set to the image's size. The source rect will be set |
| 134 * to the full image. If the layer has been initialized to another kind of | 137 * to the full image. If the layer has been initialized to another kind of |
| 135 * layer, the layer will not be changed, and <code>PP_ERROR_BADARGUMENT</code> | 138 * layer, the layer will not be changed, and <code>PP_ERROR_BADARGUMENT</code> |
| 136 * will be returned. | 139 * will be returned. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 * | 224 * |
| 222 * param[in] layer A <code>PP_Resource</code> corresponding to a compositor | 225 * param[in] layer A <code>PP_Resource</code> corresponding to a compositor |
| 223 * layer resource. | 226 * layer resource. |
| 224 * param[in] premult A <code>PP_Bool</code> with <code>PP_TRUE</code> if | 227 * param[in] premult A <code>PP_Bool</code> with <code>PP_TRUE</code> if |
| 225 * pre-multiplied alpha is used. | 228 * pre-multiplied alpha is used. |
| 226 * | 229 * |
| 227 * @return An int32_t containing a result code from <code>pp_errors.h</code>. | 230 * @return An int32_t containing a result code from <code>pp_errors.h</code>. |
| 228 */ | 231 */ |
| 229 int32_t (*SetPremultipliedAlpha)(PP_Resource layer, PP_Bool premult); | 232 int32_t (*SetPremultipliedAlpha)(PP_Resource layer, PP_Bool premult); |
| 230 }; | 233 }; |
| 234 |
| 235 struct PPB_CompositorLayer_0_1 { /* dev */ |
| 236 PP_Bool (*IsCompositorLayer)(PP_Resource resource); |
| 237 int32_t (*SetColor)(PP_Resource layer, |
| 238 float red, |
| 239 float green, |
| 240 float blue, |
| 241 float alpha, |
| 242 const struct PP_Size* size); |
| 243 int32_t (*SetTexture)(PP_Resource layer, |
| 244 PP_Resource context, |
| 245 uint32_t texture, |
| 246 const struct PP_Size* size, |
| 247 struct PP_CompletionCallback cc); |
| 248 int32_t (*SetImage)(PP_Resource layer, |
| 249 PP_Resource image_data, |
| 250 const struct PP_Size* size, |
| 251 struct PP_CompletionCallback cc); |
| 252 int32_t (*SetClipRect)(PP_Resource layer, const struct PP_Rect* rect); |
| 253 int32_t (*SetTransform)(PP_Resource layer, const float matrix[16]); |
| 254 int32_t (*SetOpacity)(PP_Resource layer, float opacity); |
| 255 int32_t (*SetBlendMode)(PP_Resource layer, PP_BlendMode mode); |
| 256 int32_t (*SetSourceRect)(PP_Resource layer, const struct PP_FloatRect* rect); |
| 257 int32_t (*SetPremultipliedAlpha)(PP_Resource layer, PP_Bool premult); |
| 258 }; |
| 231 /** | 259 /** |
| 232 * @} | 260 * @} |
| 233 */ | 261 */ |
| 234 | 262 |
| 235 #endif /* PPAPI_C_PPB_COMPOSITOR_LAYER_H_ */ | 263 #endif /* PPAPI_C_PPB_COMPOSITOR_LAYER_H_ */ |
| 236 | 264 |
| OLD | NEW |