Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 6062003: Added ppapi::Context3D interface. The API has already been reviewed. I am add... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/demos/framework/pepper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/build_gles2_cmd_buffer.py
===================================================================
--- gpu/command_buffer/build_gles2_cmd_buffer.py (revision 69970)
+++ gpu/command_buffer/build_gles2_cmd_buffer.py (working copy)
@@ -5262,6 +5262,8 @@
"// OpenGL ES interface.\n",
3)
+ file.Write("#include \"ppapi/c/pp_resource.h\"\n\n")
+
file.Write("#ifndef __gl2_h_\n")
for (k, v) in _GL_TYPES.iteritems():
file.Write("typedef %s %s;\n" % (v, k))
@@ -5292,10 +5294,11 @@
file.Write(_LICENSE)
file.Write("// This file is auto-generated. DO NOT EDIT!\n\n")
- file.Write("#include \"webkit/plugins/ppapi/ppb_graphics_3d_impl.h\"\n\n")
+ file.Write("#include \"webkit/plugins/ppapi/ppb_opengles_impl.h\"\n\n")
- file.Write("#include \"gpu/command_buffer/client/gles2_implementation.h\"")
- file.Write("\n#include \"ppapi/c/dev/ppb_opengles_dev.h\"\n\n")
+ file.Write("#include \"gpu/command_buffer/client/gles2_implementation.h\"\n")
+ file.Write("#include \"ppapi/c/dev/ppb_opengles_dev.h\"\n")
+ file.Write("#include \"webkit/plugins/ppapi/ppb_context_3d_impl.h\"\n\n")
file.Write("namespace webkit {\n")
file.Write("namespace ppapi {\n\n")
@@ -5306,19 +5309,19 @@
continue
original_arg = func.MakeTypedOriginalArgString("")
- context_arg = "PP_Resource context"
+ context_arg = "PP_Resource context_id"
if len(original_arg):
arg = context_arg + ", " + original_arg
else:
arg = context_arg
file.Write("%s %s(%s) {\n" % (func.return_type, func.name, arg))
- file.Write(""" scoped_refptr<PPB_Graphics3D_Impl> graphics_3d =
- Resource::GetAs<PPB_Graphics3D_Impl>(context);
+ file.Write(""" scoped_refptr<PPB_Context3D_Impl> context =
+ Resource::GetAs<PPB_Context3D_Impl>(context_id);
""")
return_str = "" if func.return_type == "void" else "return "
- file.Write(" %sgraphics_3d->impl()->%s(%s);\n" %
+ file.Write(" %scontext->gles2_impl()->%s(%s);\n" %
(return_str, func.original_name,
func.MakeOriginalArgString("")))
file.Write("}\n\n")
@@ -5333,7 +5336,7 @@
file.Write("} // namespace\n")
file.Write("""
-const PPB_OpenGLES2_Dev* PPB_Graphics3D_Impl::GetOpenGLES2Interface() {
+const PPB_OpenGLES2_Dev* PPB_OpenGLES_Impl::GetInterface() {
return &ppb_opengles2;
}
« no previous file with comments | « no previous file | gpu/demos/framework/pepper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698