| OLD | NEW |
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 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_graphics_2d.idl modified Tue Jan 24 16:03:48 2012. */ | 6 /* From ppb_graphics_2d.idl modified Mon Mar 19 11:35:04 2012. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PPB_GRAPHICS_2D_H_ | 8 #ifndef PPAPI_C_PPB_GRAPHICS_2D_H_ |
| 9 #define PPAPI_C_PPB_GRAPHICS_2D_H_ | 9 #define PPAPI_C_PPB_GRAPHICS_2D_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_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
| 14 #include "ppapi/c/pp_macros.h" | 14 #include "ppapi/c/pp_macros.h" |
| 15 #include "ppapi/c/pp_point.h" | 15 #include "ppapi/c/pp_point.h" |
| 16 #include "ppapi/c/pp_rect.h" | 16 #include "ppapi/c/pp_rect.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 * the image has been painted on the screen. | 238 * the image has been painted on the screen. |
| 239 * | 239 * |
| 240 * @return Returns <code>PP_OK</code> on success or | 240 * @return Returns <code>PP_OK</code> on success or |
| 241 * <code>PP_ERROR_BADRESOURCE</code> if the graphics context is invalid, | 241 * <code>PP_ERROR_BADRESOURCE</code> if the graphics context is invalid, |
| 242 * <code>PP_ERROR_BADARGUMENT</code> if the callback is null and flush is | 242 * <code>PP_ERROR_BADARGUMENT</code> if the callback is null and flush is |
| 243 * being called from the main thread of the module, or | 243 * being called from the main thread of the module, or |
| 244 * <code>PP_ERROR_INPROGRESS</code> if a flush is already pending that has | 244 * <code>PP_ERROR_INPROGRESS</code> if a flush is already pending that has |
| 245 * not issued its callback yet. In the failure case, nothing will be updated | 245 * not issued its callback yet. In the failure case, nothing will be updated |
| 246 * and no callback will be scheduled. | 246 * and no callback will be scheduled. |
| 247 */ | 247 */ |
| 248 /* TODO(darin): We should ensure that the completion callback always runs, so | |
| 249 * that it is easier for consumers to manage memory referenced by a callback. | |
| 250 * | |
| 251 * TODO(): Add back in the synchronous mode description once we have support | |
| 252 * for it. | |
| 253 */ | |
| 254 int32_t (*Flush)(PP_Resource graphics_2d, | 248 int32_t (*Flush)(PP_Resource graphics_2d, |
| 255 struct PP_CompletionCallback callback); | 249 struct PP_CompletionCallback callback); |
| 256 }; | 250 }; |
| 257 | 251 |
| 258 typedef struct PPB_Graphics2D_1_0 PPB_Graphics2D; | 252 typedef struct PPB_Graphics2D_1_0 PPB_Graphics2D; |
| 259 /** | 253 /** |
| 260 * @} | 254 * @} |
| 261 */ | 255 */ |
| 262 | 256 |
| 263 #endif /* PPAPI_C_PPB_GRAPHICS_2D_H_ */ | 257 #endif /* PPAPI_C_PPB_GRAPHICS_2D_H_ */ |
| 264 | 258 |
| OLD | NEW |