summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/client/gles2_implementation.cc
diff options
context:
space:
mode:
authorgman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-18 16:28:14 +0000
committergman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-18 16:28:14 +0000
commit9887bd5f87e8859cb932db1a726aac7508ccb7d0 (patch)
tree08909eb6c88a96f00d7e005afb83bcc29379c07a /gpu/command_buffer/client/gles2_implementation.cc
parenteaaad0d078d2ff7ea427401eb12795b9aebc0ced (diff)
downloadchromium_src-9887bd5f87e8859cb932db1a726aac7508ccb7d0.zip
chromium_src-9887bd5f87e8859cb932db1a726aac7508ccb7d0.tar.gz
chromium_src-9887bd5f87e8859cb932db1a726aac7508ccb7d0.tar.bz2
Fix PixelStorei so it does not recursively call GL functions
Also, added a bunch of auto generated unit tests. TEST=unit test BUG=107914 Review URL: http://codereview.chromium.org/8981005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114940 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/client/gles2_implementation.cc')
-rw-r--r--gpu/command_buffer/client/gles2_implementation.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index ecf4d6c..cad8722 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -2001,10 +2001,7 @@ void GLES2Implementation::GetShaderPrecisionFormat(
}
}
-const GLubyte* GLES2Implementation::GetString(GLenum name) {
- GPU_CLIENT_SINGLE_THREAD_CHECK();
- GPU_CLIENT_LOG("[" << this << "] glGetString("
- << GLES2Util::GetStringStringType(name) << ")");
+const GLubyte* GLES2Implementation::GetStringHelper(GLenum name) {
const char* result = NULL;
// Clears the bucket so if the command fails nothing will be in it.
helper_->SetBucketSize(kResultBucketId, 0);
@@ -2044,10 +2041,18 @@ const GLubyte* GLES2Implementation::GetString(GLenum name) {
result = insert_result.first->c_str();
}
}
- GPU_CLIENT_LOG(" returned " << static_cast<const char*>(result));
return reinterpret_cast<const GLubyte*>(result);
}
+const GLubyte* GLES2Implementation::GetString(GLenum name) {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << this << "] glGetString("
+ << GLES2Util::GetStringStringType(name) << ")");
+ const GLubyte* result = GetStringHelper(name);
+ GPU_CLIENT_LOG(" returned " << reinterpret_cast<const char*>(result));
+ return result;
+}
+
void GLES2Implementation::GetUniformfv(
GLuint program, GLint location, GLfloat* params) {
GPU_CLIENT_SINGLE_THREAD_CHECK();