summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-30 18:20:47 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-30 18:20:47 +0000
commit88a8115978d75161674d97cde0761cbdba73daed (patch)
tree88e707554cc4b0d13eed13cc26bd7fd318df366e /ppapi
parentc07980002eefd0f4ba80fa4042fa52af2801353d (diff)
downloadchromium_src-88a8115978d75161674d97cde0761cbdba73daed.zip
chromium_src-88a8115978d75161674d97cde0761cbdba73daed.tar.gz
chromium_src-88a8115978d75161674d97cde0761cbdba73daed.tar.bz2
Fix ppb_graphics_3d example code
The example code in the comments in this header file doesn't compile. This CL corrects the sample code to actually work. Review URL: https://chromiumcodereview.appspot.com/23494012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220611 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/api/ppb_graphics_3d.idl11
-rw-r--r--ppapi/c/ppb_graphics_3d.h13
2 files changed, 15 insertions, 9 deletions
diff --git a/ppapi/api/ppb_graphics_3d.idl b/ppapi/api/ppb_graphics_3d.idl
index 28a0c40..b39ad24 100644
--- a/ppapi/api/ppb_graphics_3d.idl
+++ b/ppapi/api/ppb_graphics_3d.idl
@@ -29,14 +29,17 @@ label Chrome {
* int32_t attribs[] = {PP_GRAPHICS3DATTRIB_WIDTH, 800,
* PP_GRAPHICS3DATTRIB_HEIGHT, 800,
* PP_GRAPHICS3DATTRIB_NONE};
- * context = g3d->Create(instance, attribs, &context);
+ * context = g3d->Create(instance, 0, attribs);
* inst->BindGraphics(instance, context);
* @endcode
*
* <strong>Present one frame:</strong>
* @code
- * gles2->Clear(context, GL_COLOR_BUFFER);
- * g3d->SwapBuffers(context);
+ * PP_CompletionCallback callback = {
+ * DidFinishSwappingBuffers, 0, PP_COMPLETIONCALLBACK_FLAG_NONE,
+ * };
+ * gles2->Clear(context, GL_COLOR_BUFFER_BIT);
+ * g3d->SwapBuffers(context, callback);
* @endcode
*
* <strong>Shutdown:</strong>
@@ -92,7 +95,7 @@ interface PPB_Graphics3D {
* already shares with, and the newly created context. An arbitrary number of
* <code>PPB_Graphics3D</code> can share data in this fashion.
*
- * @param[out] attrib_list specifies a list of attributes for the context.
+ * @param[in] attrib_list specifies a list of attributes for the context.
* It is a list of attribute name-value pairs in which each attribute is
* immediately followed by the corresponding desired value. The list is
* terminated with <code>PP_GRAPHICS3DATTRIB_NONE</code>.
diff --git a/ppapi/c/ppb_graphics_3d.h b/ppapi/c/ppb_graphics_3d.h
index 1da70a0..c9ed91c 100644
--- a/ppapi/c/ppb_graphics_3d.h
+++ b/ppapi/c/ppb_graphics_3d.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_graphics_3d.idl modified Thu Mar 28 10:12:11 2013. */
+/* From ppb_graphics_3d.idl modified Fri Aug 30 08:36:16 2013. */
#ifndef PPAPI_C_PPB_GRAPHICS_3D_H_
#define PPAPI_C_PPB_GRAPHICS_3D_H_
@@ -42,14 +42,17 @@
* int32_t attribs[] = {PP_GRAPHICS3DATTRIB_WIDTH, 800,
* PP_GRAPHICS3DATTRIB_HEIGHT, 800,
* PP_GRAPHICS3DATTRIB_NONE};
- * context = g3d->Create(instance, attribs, &context);
+ * context = g3d->Create(instance, 0, attribs);
* inst->BindGraphics(instance, context);
* @endcode
*
* <strong>Present one frame:</strong>
* @code
- * gles2->Clear(context, GL_COLOR_BUFFER);
- * g3d->SwapBuffers(context);
+ * PP_CompletionCallback callback = {
+ * DidFinishSwappingBuffers, 0, PP_COMPLETIONCALLBACK_FLAG_NONE,
+ * };
+ * gles2->Clear(context, GL_COLOR_BUFFER_BIT);
+ * g3d->SwapBuffers(context, callback);
* @endcode
*
* <strong>Shutdown:</strong>
@@ -102,7 +105,7 @@ struct PPB_Graphics3D_1_0 {
* already shares with, and the newly created context. An arbitrary number of
* <code>PPB_Graphics3D</code> can share data in this fashion.
*
- * @param[out] attrib_list specifies a list of attributes for the context.
+ * @param[in] attrib_list specifies a list of attributes for the context.
* It is a list of attribute name-value pairs in which each attribute is
* immediately followed by the corresponding desired value. The list is
* terminated with <code>PP_GRAPHICS3DATTRIB_NONE</code>.