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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 529004: Fixed some bugs that prevented the GPU plugin from shutting down without cras... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include <vector> 9 #include <vector>
10 #include <string> 10 #include <string>
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 } else { 1141 } else {
1142 current_program_info_ = info; 1142 current_program_info_ = info;
1143 glUseProgram(program); 1143 glUseProgram(program);
1144 } 1144 }
1145 } 1145 }
1146 1146
1147 GLenum GLES2DecoderImpl::GetGLError() { 1147 GLenum GLES2DecoderImpl::GetGLError() {
1148 // Check the GL error first, then our wrapped error. 1148 // Check the GL error first, then our wrapped error.
1149 GLenum error = glGetError(); 1149 GLenum error = glGetError();
1150 if (error == GL_NO_ERROR && error_bits_ != 0) { 1150 if (error == GL_NO_ERROR && error_bits_ != 0) {
1151 uint32 mask = 1; 1151 for (uint32 mask = 1; mask != 0; mask = mask << 1) {
1152 while (mask) {
1153 if ((error_bits_ & mask) != 0) { 1152 if ((error_bits_ & mask) != 0) {
1154 error = GLErrorBitToGLError(mask); 1153 error = GLErrorBitToGLError(mask);
1155 break; 1154 break;
1156 } 1155 }
1157 } 1156 }
1158 } 1157 }
1159 1158
1160 if (error != GL_NO_ERROR) { 1159 if (error != GL_NO_ERROR) {
1161 // There was an error, clear the corresponding wrapped error. 1160 // There was an error, clear the corresponding wrapped error.
1162 error_bits_ &= ~GLErrorToErrorBit(error); 1161 error_bits_ &= ~GLErrorToErrorBit(error);
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1755 return parse_error::kParseNoError; 1754 return parse_error::kParseNoError;
1756 } 1755 }
1757 1756
1758 // Include the auto-generated part of this file. We split this because it means 1757 // Include the auto-generated part of this file. We split this because it means
1759 // we can easily edit the non-auto generated parts right here in this file 1758 // we can easily edit the non-auto generated parts right here in this file
1760 // instead of having to edit some template or the code generator. 1759 // instead of having to edit some template or the code generator.
1761 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 1760 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
1762 1761
1763 } // namespace gles2 1762 } // namespace gles2
1764 } // namespace gpu 1763 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | webkit/tools/pepper_test_plugin/plugin_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698