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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 10214014: Backport to R19 of r132638 r133017 r133579 r133732 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src
Patch Set: Created 8 years, 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // A class to emulate GLES2 over command buffers. 5 // A class to emulate GLES2 over command buffers.
6 6
7 #include "../client/gles2_implementation.h" 7 #include "../client/gles2_implementation.h"
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 2448 matching lines...) Expand 10 before | Expand all | Expand 10 after
2459 void GLES2Implementation::DeleteTexturesHelper( 2459 void GLES2Implementation::DeleteTexturesHelper(
2460 GLsizei n, const GLuint* textures) { 2460 GLsizei n, const GLuint* textures) {
2461 if (!id_handlers_[id_namespaces::kTextures]->FreeIds(n, textures)) { 2461 if (!id_handlers_[id_namespaces::kTextures]->FreeIds(n, textures)) {
2462 SetGLError( 2462 SetGLError(
2463 GL_INVALID_VALUE, 2463 GL_INVALID_VALUE,
2464 "glDeleteTextures: id not created by this context."); 2464 "glDeleteTextures: id not created by this context.");
2465 return; 2465 return;
2466 } 2466 }
2467 for (GLsizei ii = 0; ii < n; ++ii) { 2467 for (GLsizei ii = 0; ii < n; ++ii) {
2468 for (GLint tt = 0; tt < gl_state_.max_combined_texture_image_units; ++tt) { 2468 for (GLint tt = 0; tt < gl_state_.max_combined_texture_image_units; ++tt) {
2469 TextureUnit& unit = texture_units_[active_texture_unit_]; 2469 TextureUnit& unit = texture_units_[tt];
2470 if (textures[ii] == unit.bound_texture_2d) { 2470 if (textures[ii] == unit.bound_texture_2d) {
2471 unit.bound_texture_2d = 0; 2471 unit.bound_texture_2d = 0;
2472 } 2472 }
2473 if (textures[ii] == unit.bound_texture_cube_map) { 2473 if (textures[ii] == unit.bound_texture_cube_map) {
2474 unit.bound_texture_cube_map = 0; 2474 unit.bound_texture_cube_map = 0;
2475 } 2475 }
2476 } 2476 }
2477 } 2477 }
2478 helper_->DeleteTexturesImmediate(n, textures); 2478 helper_->DeleteTexturesImmediate(n, textures);
2479 } 2479 }
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
3254 helper_->BindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); 3254 helper_->BindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
3255 } 3255 }
3256 #else 3256 #else
3257 helper_->DrawElementsInstancedANGLE( 3257 helper_->DrawElementsInstancedANGLE(
3258 mode, count, type, ToGLuint(indices), primcount); 3258 mode, count, type, ToGLuint(indices), primcount);
3259 #endif 3259 #endif
3260 } 3260 }
3261 3261
3262 } // namespace gles2 3262 } // namespace gles2
3263 } // namespace gpu 3263 } // namespace gpu
OLDNEW
« no previous file with comments | « content/common/gpu/texture_image_transport_surface.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698