| Index: gpu/command_buffer/client/gles2_implementation_autogen.h
|
| ===================================================================
|
| --- gpu/command_buffer/client/gles2_implementation_autogen.h (revision 98673)
|
| +++ gpu/command_buffer/client/gles2_implementation_autogen.h (working copy)
|
| @@ -221,8 +221,6 @@
|
| return;
|
| }
|
| DeleteBuffersHelper(n, buffers);
|
| - helper_->DeleteBuffersImmediate(n, buffers);
|
| - Flush();
|
| }
|
|
|
| void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {
|
| @@ -242,16 +240,12 @@
|
| return;
|
| }
|
| DeleteFramebuffersHelper(n, framebuffers);
|
| - helper_->DeleteFramebuffersImmediate(n, framebuffers);
|
| - Flush();
|
| }
|
|
|
| void DeleteProgram(GLuint program) {
|
| GPU_CLIENT_LOG("[" << this << "] glDeleteProgram(" << program << ")");
|
| GPU_CLIENT_DCHECK(program != 0);
|
| - program_and_shader_id_handler_->FreeIds(1, &program);
|
| - helper_->DeleteProgram(program);
|
| - Flush();
|
| + DeleteProgramHelper(program);
|
| }
|
|
|
| void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) {
|
| @@ -271,16 +265,12 @@
|
| return;
|
| }
|
| DeleteRenderbuffersHelper(n, renderbuffers);
|
| - helper_->DeleteRenderbuffersImmediate(n, renderbuffers);
|
| - Flush();
|
| }
|
|
|
| void DeleteShader(GLuint shader) {
|
| GPU_CLIENT_LOG("[" << this << "] glDeleteShader(" << shader << ")");
|
| GPU_CLIENT_DCHECK(shader != 0);
|
| - program_and_shader_id_handler_->FreeIds(1, &shader);
|
| - helper_->DeleteShader(shader);
|
| - Flush();
|
| + DeleteShaderHelper(shader);
|
| }
|
|
|
| void DeleteTextures(GLsizei n, const GLuint* textures) {
|
| @@ -300,8 +290,6 @@
|
| return;
|
| }
|
| DeleteTexturesHelper(n, textures);
|
| - helper_->DeleteTexturesImmediate(n, textures);
|
| - Flush();
|
| }
|
|
|
| void DepthFunc(GLenum func) {
|
| @@ -571,19 +559,20 @@
|
| << static_cast<void*>(infolog) << ")");
|
| helper_->SetBucketSize(kResultBucketId, 0);
|
| helper_->GetProgramInfoLog(program, 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) - 1, str.size());
|
| - if (length != NULL) {
|
| - *length = max_size;
|
| - }
|
| memcpy(infolog, str.c_str(), max_size);
|
| infolog[max_size] = '\0';
|
| GPU_CLIENT_LOG("------\n" << infolog << "\n------");
|
| }
|
| }
|
| + if (length != NULL) {
|
| + *length = max_size;
|
| + }
|
| }
|
| void GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) {
|
| GPU_CLIENT_VALIDATE_DESTINATION_INITALIZATION(GLint, params);
|
| @@ -633,19 +622,20 @@
|
| << static_cast<void*>(infolog) << ")");
|
| helper_->SetBucketSize(kResultBucketId, 0);
|
| helper_->GetShaderInfoLog(shader, 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) - 1, str.size());
|
| - if (length != NULL) {
|
| - *length = max_size;
|
| - }
|
| memcpy(infolog, str.c_str(), max_size);
|
| infolog[max_size] = '\0';
|
| GPU_CLIENT_LOG("------\n" << infolog << "\n------");
|
| }
|
| }
|
| + if (length != NULL) {
|
| + *length = max_size;
|
| + }
|
| }
|
| void GetShaderPrecisionFormat(
|
| GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
|
| @@ -660,19 +650,20 @@
|
| << static_cast<void*>(source) << ")");
|
| helper_->SetBucketSize(kResultBucketId, 0);
|
| helper_->GetShaderSource(shader, 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) - 1, str.size());
|
| - if (length != NULL) {
|
| - *length = max_size;
|
| - }
|
| memcpy(source, str.c_str(), max_size);
|
| source[max_size] = '\0';
|
| GPU_CLIENT_LOG("------\n" << source << "\n------");
|
| }
|
| }
|
| + if (length != NULL) {
|
| + *length = max_size;
|
| + }
|
| }
|
| const GLubyte* GetString(GLenum name);
|
|
|
| @@ -809,10 +800,7 @@
|
| helper_->LineWidth(width);
|
| }
|
|
|
| -void LinkProgram(GLuint program) {
|
| - GPU_CLIENT_LOG("[" << this << "] glLinkProgram(" << program << ")");
|
| - helper_->LinkProgram(program);
|
| -}
|
| +void LinkProgram(GLuint program);
|
|
|
| void PixelStorei(GLenum pname, GLint param);
|
|
|
|
|