| 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 #ifndef PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_ | 5 #ifndef PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_ |
| 6 #define PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_ | 6 #define PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/dev/pp_graphics_3d_dev.h" | 8 #include "ppapi/c/dev/pp_graphics_3d_dev.h" |
| 9 | 9 |
| 10 #include "ppapi/c/pp_bool.h" | 10 #include "ppapi/c/pp_bool.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // context = g3d->Create(instance, config, attribs, &context); | 24 // context = g3d->Create(instance, config, attribs, &context); |
| 25 // inst->BindGraphics(instance, context); | 25 // inst->BindGraphics(instance, context); |
| 26 // | 26 // |
| 27 // // Present one frame. | 27 // // Present one frame. |
| 28 // gles2->Clear(context, GL_COLOR_BUFFER); | 28 // gles2->Clear(context, GL_COLOR_BUFFER); |
| 29 // g3d->SwapBuffers(context); | 29 // g3d->SwapBuffers(context); |
| 30 // | 30 // |
| 31 // // Shutdown. | 31 // // Shutdown. |
| 32 // core->ReleaseResource(context); | 32 // core->ReleaseResource(context); |
| 33 | 33 |
| 34 #define PPB_GRAPHICS_3D_DEV_INTERFACE "PPB_Graphics3D(Dev);0.4" | 34 #define PPB_GRAPHICS_3D_DEV_INTERFACE_0_4 "PPB_Graphics3D(Dev);0.4" |
| 35 #define PPB_GRAPHICS_3D_DEV_INTERFACE PPB_GRAPHICS_3D_DEV_INTERFACE_0_4 |
| 35 | 36 |
| 36 struct PPB_Graphics3D_Dev { | 37 struct PPB_Graphics3D_Dev { |
| 37 // TODO(alokp): Do these functions need module argument? | 38 // TODO(alokp): Do these functions need module argument? |
| 38 | 39 |
| 39 // Retrieves the list of all available PP_Config3D_Devs. | 40 // Retrieves the list of all available PP_Config3D_Devs. |
| 40 // configs is a pointer to a buffer containing config_size elements. | 41 // configs is a pointer to a buffer containing config_size elements. |
| 41 // On success, PP_OK is returned. The number of configurations is returned | 42 // On success, PP_OK is returned. The number of configurations is returned |
| 42 // in num_config, and elements 0 through num_config - 1 of configs are filled | 43 // in num_config, and elements 0 through num_config - 1 of configs are filled |
| 43 // in with valid PP_Config3D_Devs. No more than config_size | 44 // in with valid PP_Config3D_Devs. No more than config_size |
| 44 // PP_Config3D_Devs will be returned even if more are available. | 45 // PP_Config3D_Devs will be returned even if more are available. |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 // plugin's current state is actually on the screen, this function provides a | 220 // plugin's current state is actually on the screen, this function provides a |
| 220 // way to rate limit animations. By waiting until the image is on the screen | 221 // way to rate limit animations. By waiting until the image is on the screen |
| 221 // before painting the next frame, you can ensure you're not generating | 222 // before painting the next frame, you can ensure you're not generating |
| 222 // updates faster than the screen can be updated. | 223 // updates faster than the screen can be updated. |
| 223 int32_t (*SwapBuffers)(PP_Resource context, | 224 int32_t (*SwapBuffers)(PP_Resource context, |
| 224 struct PP_CompletionCallback callback); | 225 struct PP_CompletionCallback callback); |
| 225 }; | 226 }; |
| 226 | 227 |
| 227 #endif /* PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_ */ | 228 #endif /* PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_ */ |
| 228 | 229 |
| OLD | NEW |