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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

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
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 1dd1bfdee5b7a6948de1566c18705ab32892c0af..b7477c5e3204ac2e3fb69e61f73caddadafd3542 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -4727,7 +4727,7 @@ error::Error GLES2DecoderImpl::HandleGetProgramInfoLog(
ProgramManager::ProgramInfo* info = GetProgramInfoNotShader(
program, "glGetProgramInfoLog");
if (!info || !info->log_info()) {
- bucket->SetSize(0);
+ bucket->SetFromString("");
return error::kNoError;
}
bucket->SetFromString(info->log_info()->c_str());
@@ -4742,7 +4742,7 @@ error::Error GLES2DecoderImpl::HandleGetShaderInfoLog(
ShaderManager::ShaderInfo* info = GetShaderInfoNotProgram(
shader, "glGetShaderInfoLog");
if (!info || !info->log_info()) {
- bucket->SetSize(0);
+ bucket->SetFromString("");
return error::kNoError;
}
bucket->SetFromString(info->log_info()->c_str());
@@ -6792,17 +6792,9 @@ error::Error GLES2DecoderImpl::HandleGetProgramInfoCHROMIUM(
Bucket* bucket = CreateBucket(bucket_id);
bucket->SetSize(sizeof(ProgramInfoHeader)); // in case we fail.
ProgramManager::ProgramInfo* info = NULL;
- if (program) {
- info = GetProgramInfoNotShader(program, "glGetProgramInfoCHROMIUM");
- if (!info) {
- return error::kNoError;
- }
- if (!info->IsValid()) {
- // Program was not linked successfully. (ie, glLinkProgram)
- SetGLError(GL_INVALID_OPERATION,
- "glGetProgramInfoCHROMIUM: program not linked");
- return error::kNoError;
- }
+ info = GetProgramInfo(program);
+ if (!info || !info->IsValid()) {
+ return error::kNoError;
}
info->GetProgramInfo(bucket);
return error::kNoError;
« no previous file with comments | « gpu/command_buffer/client/program_info_manager_unittest.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698