Index: gpu/command_buffer/build_gles2_cmd_buffer.py |
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py |
index 00c64147934d13b49b7f540685b1b9cdc3f8609a..2db5f0fe72af5eadd5fe2a7fc5a8a317bc0fb237 100755 |
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py |
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py |
@@ -4872,13 +4872,17 @@ TEST_P(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) { |
f.write("%s MojoGLES2Impl::%s(%s) {\n" % |
(func.return_type, func.original_name, |
func.MakeTypedOriginalArgString(""))) |
- extensions = ["CHROMIUM_sync_point", "CHROMIUM_texture_mailbox", |
+ extensions = [True, "CHROMIUM_sync_point", "CHROMIUM_texture_mailbox", |
"CHROMIUM_sub_image", "CHROMIUM_miscellaneous", |
"occlusion_query_EXT", "CHROMIUM_image", |
"CHROMIUM_copy_texture", |
"CHROMIUM_pixel_transfer_buffer_object", |
"chromium_framebuffer_multisample"] |
- if func.IsCoreGLFunction() or func.GetInfo("extension") in extensions: |
+ |
+ is_core_gl_func = func.IsCoreGLFunction() |
+ ext = func.GetInfo("extension") |
+ is_safe = not func.IsUnsafe() |
+ if is_core_gl_func or (is_safe and ext in extensions): |
f.write("MojoGLES2MakeCurrent(context_);"); |
func_return = "gl" + func.original_name + "(" + \ |
func.MakeOriginalArgString("") + ");" |
@@ -10459,6 +10463,7 @@ class MojoGLES2Impl : public gpu::gles2::GLES2Interface { |
#include "base/logging.h" |
#include "third_party/mojo/src/mojo/public/c/gles2/chromium_copy_texture.h" |
+#include "third_party/mojo/src/mojo/public/c/gles2/chromium_extension.h" |
#include "third_party/mojo/src/mojo/public/c/gles2/chromium_framebuffer_multisample.h" |
#include "third_party/mojo/src/mojo/public/c/gles2/chromium_image.h" |
#include "third_party/mojo/src/mojo/public/c/gles2/chromium_miscellaneous.h" |
@@ -10892,6 +10897,8 @@ const size_t GLES2Util::enum_to_string_table_len_ = |
for func in self.original_functions: |
if func.GetInfo("extension") != extension: |
continue |
+ if func.IsUnsafe(): |
+ continue |
f.write("VISIT_GL_CALL(%s, %s, (%s), (%s))\n" % |
(func.name, func.return_type, |
func.MakeTypedOriginalArgString(""), |
@@ -11011,6 +11018,9 @@ def main(argv): |
"gles2_call_visitor") |
gen.WriteMojoGLCallVisitor(mojo_gles2_prefix + "_autogen.h") |
gen.WriteMojoGLCallVisitorForExtension( |
+ mojo_gles2_prefix + "_chromium_extension_autogen.h", |
+ True) |
Peng
2015/09/17 16:32:33
I am wondering why not put all gl extension APIs i
piman
2015/09/17 23:51:38
I would prefer if you tagged each function that yo
Peng
2015/09/18 15:17:16
I tagged most functions, except several functions
|
+ gen.WriteMojoGLCallVisitorForExtension( |
mojo_gles2_prefix + "_chromium_texture_mailbox_autogen.h", |
"CHROMIUM_texture_mailbox") |
gen.WriteMojoGLCallVisitorForExtension( |