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

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 7358006: Cache OpenGL program info on the client side of the command buffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 4 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 | gpu/command_buffer/client/gles2_implementation.h » ('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 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()
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698