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 ee7d6defe7a93087aebd251a57fc6f2aed4f0768..c3c023f28b429cf2fe79ff599a608340ae52dbbb 100755 |
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py |
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py |
@@ -1489,7 +1489,10 @@ _FUNCTION_INFO = { |
'decoder_func': 'DoIsTexture', |
'expectation': False, |
}, |
- 'LinkProgram': {'decoder_func': 'DoLinkProgram'}, |
+ 'LinkProgram': { |
+ 'decoder_func': 'DoLinkProgram', |
+ 'impl_func': False, |
+ }, |
'MapBufferSubDataCHROMIUM': { |
'gen_cmd': False, |
'extension': True, |
@@ -3068,7 +3071,7 @@ class DeleteHandler(TypeHandler): |
arg.WriteClientSideValidationCode(file, func) |
file.Write( |
" GPU_CLIENT_DCHECK(%s != 0);\n" % func.GetOriginalArgs()[-1].name) |
- file.Write(" program_and_shader_id_handler_->FreeIds(1, &%s);\n" % |
+ file.Write(" DeleteProgramOrShaderHelper(%s);\n" % |
func.GetOriginalArgs()[-1].name) |
file.Write(" helper_->%s(%s);\n" % |
(func.name, func.MakeCmdArgString(""))) |
@@ -4212,19 +4215,20 @@ class STRnHandler(TypeHandler): |
<< static_cast<void*>(%(arg3)s) << ")"); |
helper_->SetBucketSize(kResultBucketId, 0); |
helper_->%(func_name)s(%(id_name)s, kResultBucketId); |
- if (bufsize > 0) { |
- std::string str; |
- if (GetBucketAsString(kResultBucketId, &str)) { |
- GLsizei max_size = |
+ std::string str; |
+ GLsizei max_size = 0; |
+ if (GetBucketAsString(kResultBucketId, &str)) { |
+ if (bufsize > 0) { |
+ max_size = |
std::min(static_cast<size_t>(%(bufsize_name)s) - 1, str.size()); |
- if (%(length_name)s != NULL) { |
- *%(length_name)s = max_size; |
- } |
memcpy(%(dest_name)s, str.c_str(), max_size); |
%(dest_name)s[max_size] = '\\0'; |
GPU_CLIENT_LOG("------\\n" << %(dest_name)s << "\\n------"); |
} |
} |
+ if (%(length_name)s != NULL) { |
+ *%(length_name)s = max_size; |
+ } |
} |
""" |
args = func.GetOriginalArgs() |