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

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

Issue 525039: Minor fix for GLES2... (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <vector> 6 #include <vector>
7 #include <string> 7 #include <string>
8 #include <map> 8 #include <map>
9 #include <build/build_config.h> 9 #include <build/build_config.h>
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 // TODO(gman): Should we check for error? 1210 // TODO(gman): Should we check for error?
1211 scoped_array<char> name_buffer(new char[max_len + 1]); 1211 scoped_array<char> name_buffer(new char[max_len + 1]);
1212 for (GLint ii = 0; ii < num_attribs; ++ii) { 1212 for (GLint ii = 0; ii < num_attribs; ++ii) {
1213 GLsizei length; 1213 GLsizei length;
1214 GLsizei size; 1214 GLsizei size;
1215 GLenum type; 1215 GLenum type;
1216 glGetActiveAttrib( 1216 glGetActiveAttrib(
1217 program, ii, max_len + 1, &length, &size, &type, name_buffer.get()); 1217 program, ii, max_len + 1, &length, &size, &type, name_buffer.get());
1218 // TODO(gman): Should we check for error? 1218 // TODO(gman): Should we check for error?
1219 GLint location = glGetAttribLocation(program, name_buffer.get()); 1219 GLint location = glGetAttribLocation(program, name_buffer.get());
1220 info->SetAttributeLocation(ii, num_attribs); 1220 info->SetAttributeLocation(ii, location);
1221 } 1221 }
1222 } 1222 }
1223 1223
1224 void GLES2DecoderImpl::RemoveProgramInfo(GLuint program) { 1224 void GLES2DecoderImpl::RemoveProgramInfo(GLuint program) {
1225 ProgramInfoMap::iterator it = program_infos_.find(program); 1225 ProgramInfoMap::iterator it = program_infos_.find(program);
1226 if (it != program_infos_.end()) { 1226 if (it != program_infos_.end()) {
1227 if (current_program_info_ == &it->second) { 1227 if (current_program_info_ == &it->second) {
1228 current_program_info_ = NULL; 1228 current_program_info_ = NULL;
1229 } 1229 }
1230 program_infos_.erase(it); 1230 program_infos_.erase(it);
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 } 1751 }
1752 1752
1753 // Include the auto-generated part of this file. We split this because it means 1753 // Include the auto-generated part of this file. We split this because it means
1754 // we can easily edit the non-auto generated parts right here in this file 1754 // we can easily edit the non-auto generated parts right here in this file
1755 // instead of having to edit some template or the code generator. 1755 // instead of having to edit some template or the code generator.
1756 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 1756 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
1757 1757
1758 } // namespace gles2 1758 } // namespace gles2
1759 } // namespace gpu 1759 } // namespace gpu
1760 1760
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698