Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 7459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7470 const gles2::DestroyStreamTextureCHROMIUM& c) { | 7470 const gles2::DestroyStreamTextureCHROMIUM& c) { |
| 7471 GLuint client_id = c.texture; | 7471 GLuint client_id = c.texture; |
| 7472 TextureManager::TextureInfo* info = | 7472 TextureManager::TextureInfo* info = |
| 7473 texture_manager()->GetTextureInfo(client_id); | 7473 texture_manager()->GetTextureInfo(client_id); |
| 7474 if (info && info->IsStreamTexture()) { | 7474 if (info && info->IsStreamTexture()) { |
| 7475 if (!stream_texture_manager_) | 7475 if (!stream_texture_manager_) |
| 7476 return error::kInvalidArguments; | 7476 return error::kInvalidArguments; |
| 7477 | 7477 |
| 7478 stream_texture_manager_->DestroyStreamTexture(info->service_id()); | 7478 stream_texture_manager_->DestroyStreamTexture(info->service_id()); |
| 7479 info->SetStreamTexture(false); | 7479 info->SetStreamTexture(false); |
| 7480 texture_manager()->SetInfoTarget(feature_info_, info, 0); | |
|
greggman
2011/11/29 21:39:43
Something needs to happen here. The texture is goi
| |
| 7481 } else { | 7480 } else { |
| 7482 SetGLError(GL_INVALID_VALUE, | 7481 SetGLError(GL_INVALID_VALUE, |
| 7483 "glDestroyStreamTextureCHROMIUM: bad texture id."); | 7482 "glDestroyStreamTextureCHROMIUM: bad texture id."); |
| 7484 } | 7483 } |
| 7485 | 7484 |
| 7486 return error::kNoError; | 7485 return error::kNoError; |
| 7487 } | 7486 } |
| 7488 | 7487 |
| 7489 // Include the auto-generated part of this file. We split this because it means | 7488 // Include the auto-generated part of this file. We split this because it means |
| 7490 // we can easily edit the non-auto generated parts right here in this file | 7489 // we can easily edit the non-auto generated parts right here in this file |
| 7491 // instead of having to edit some template or the code generator. | 7490 // instead of having to edit some template or the code generator. |
| 7492 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 7491 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 7493 | 7492 |
| 7494 } // namespace gles2 | 7493 } // namespace gles2 |
| 7495 } // namespace gpu | 7494 } // namespace gpu |
| OLD | NEW |