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

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

Issue 11421148: Fix the DCHECK problem for TextureManager::TextureInfo::SetTarget (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: change Created 8 years 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) 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 #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 8774 matching lines...) Expand 10 before | Expand all | Expand 10 after
8785 const gles2::DestroyStreamTextureCHROMIUM& c) { 8785 const gles2::DestroyStreamTextureCHROMIUM& c) {
8786 GLuint client_id = c.texture; 8786 GLuint client_id = c.texture;
8787 TextureManager::TextureInfo* info = 8787 TextureManager::TextureInfo* info =
8788 texture_manager()->GetTextureInfo(client_id); 8788 texture_manager()->GetTextureInfo(client_id);
8789 if (info && info->IsStreamTexture()) { 8789 if (info && info->IsStreamTexture()) {
8790 if (!stream_texture_manager_) 8790 if (!stream_texture_manager_)
8791 return error::kInvalidArguments; 8791 return error::kInvalidArguments;
8792 8792
8793 stream_texture_manager_->DestroyStreamTexture(info->service_id()); 8793 stream_texture_manager_->DestroyStreamTexture(info->service_id());
8794 info->SetStreamTexture(false); 8794 info->SetStreamTexture(false);
8795 texture_manager()->SetInfoTarget(info, 0);
8796 } else { 8795 } else {
8797 SetGLError(GL_INVALID_VALUE, 8796 SetGLError(GL_INVALID_VALUE,
8798 "glDestroyStreamTextureCHROMIUM", "bad texture id."); 8797 "glDestroyStreamTextureCHROMIUM", "bad texture id.");
8799 } 8798 }
8800 8799
8801 return error::kNoError; 8800 return error::kNoError;
8802 } 8801 }
8803 8802
8804 #if defined(OS_MACOSX) 8803 #if defined(OS_MACOSX)
8805 void GLES2DecoderImpl::ReleaseIOSurfaceForTexture(GLuint texture_id) { 8804 void GLES2DecoderImpl::ReleaseIOSurfaceForTexture(GLuint texture_id) {
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
9365 gpu_trace_stack_.pop(); 9364 gpu_trace_stack_.pop();
9366 } 9365 }
9367 9366
9368 // Include the auto-generated part of this file. We split this because it means 9367 // Include the auto-generated part of this file. We split this because it means
9369 // we can easily edit the non-auto generated parts right here in this file 9368 // we can easily edit the non-auto generated parts right here in this file
9370 // instead of having to edit some template or the code generator. 9369 // instead of having to edit some template or the code generator.
9371 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 9370 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
9372 9371
9373 } // namespace gles2 9372 } // namespace gles2
9374 } // namespace gpu 9373 } // 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