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

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 1349233002: Mandoline: Enable more GL commands which are used by WebGL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months 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 | mojo/gles2/gles2_impl.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
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(
« no previous file with comments | « no previous file | mojo/gles2/gles2_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698