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

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

Issue 2770007: Fix for DrawArrays, DrawElements. Removed the check... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 6 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 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 2989 matching lines...) Expand 10 before | Expand all | Expand 10 after
3000 texture_info ? texture_info->service_id() : 0); 3000 texture_info ? texture_info->service_id() : 0);
3001 } 3001 }
3002 } 3002 }
3003 } 3003 }
3004 } 3004 }
3005 // Set the active texture back to whatever the user had it as. 3005 // Set the active texture back to whatever the user had it as.
3006 glActiveTexture(GL_TEXTURE0 + active_texture_unit_); 3006 glActiveTexture(GL_TEXTURE0 + active_texture_unit_);
3007 } 3007 }
3008 3008
3009 bool GLES2DecoderImpl::IsDrawValid(GLuint max_vertex_accessed) { 3009 bool GLES2DecoderImpl::IsDrawValid(GLuint max_vertex_accessed) {
3010 if (!current_program_ || current_program_->IsDeleted() || 3010 // NOTE: We specifically do not check current_program->IsValid() because
3011 !current_program_->IsValid()) { 3011 // it could never be invalid since glUseProgram would have failed. While
3012 // glLinkProgram could later mark the program as invalid the previous
3013 // valid program will stull function if it is still the current program.
apatrick 2010/06/09 17:52:53 stull -> still
3014 if (!current_program_ || current_program_->IsDeleted()) {
3012 // The program does not exist. 3015 // The program does not exist.
3013 // But GL says no ERROR. 3016 // But GL says no ERROR.
3014 return false; 3017 return false;
3015 } 3018 }
3016 // Validate all attribs currently enabled. If they are used by the current 3019 // Validate all attribs currently enabled. If they are used by the current
3017 // program then check that they have enough elements to handle the draw call. 3020 // program then check that they have enough elements to handle the draw call.
3018 // If they are not used by the current program check that they have a buffer 3021 // If they are not used by the current program check that they have a buffer
3019 // assigned. 3022 // assigned.
3020 const VertexAttribManager::VertexAttribInfoList& infos = 3023 const VertexAttribManager::VertexAttribInfoList& infos =
3021 vertex_attrib_manager_.GetEnabledVertexAttribInfos(); 3024 vertex_attrib_manager_.GetEnabledVertexAttribInfos();
(...skipping 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after
4725 return error::kNoError; 4728 return error::kNoError;
4726 } 4729 }
4727 4730
4728 // Include the auto-generated part of this file. We split this because it means 4731 // Include the auto-generated part of this file. We split this because it means
4729 // we can easily edit the non-auto generated parts right here in this file 4732 // we can easily edit the non-auto generated parts right here in this file
4730 // instead of having to edit some template or the code generator. 4733 // instead of having to edit some template or the code generator.
4731 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 4734 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
4732 4735
4733 } // namespace gles2 4736 } // namespace gles2
4734 } // namespace gpu 4737 } // namespace gpu
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