OLD | NEW |
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 5115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5126 | 5126 |
5127 error::Error GLES2DecoderImpl::HandleDeleteShader(uint32 immediate_data_size, | 5127 error::Error GLES2DecoderImpl::HandleDeleteShader(uint32 immediate_data_size, |
5128 const void* cmd_data) { | 5128 const void* cmd_data) { |
5129 const gles2::cmds::DeleteShader& c = | 5129 const gles2::cmds::DeleteShader& c = |
5130 *static_cast<const gles2::cmds::DeleteShader*>(cmd_data); | 5130 *static_cast<const gles2::cmds::DeleteShader*>(cmd_data); |
5131 GLuint client_id = c.shader; | 5131 GLuint client_id = c.shader; |
5132 if (client_id) { | 5132 if (client_id) { |
5133 Shader* shader = GetShader(client_id); | 5133 Shader* shader = GetShader(client_id); |
5134 if (shader) { | 5134 if (shader) { |
5135 if (!shader->IsDeleted()) { | 5135 if (!shader->IsDeleted()) { |
5136 glDeleteShader(shader->service_id()); | 5136 shader_manager()->Delete(shader); |
5137 shader_manager()->MarkAsDeleted(shader); | |
5138 } | 5137 } |
5139 } else { | 5138 } else { |
5140 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glDeleteShader", "unknown shader"); | 5139 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glDeleteShader", "unknown shader"); |
5141 } | 5140 } |
5142 } | 5141 } |
5143 return error::kNoError; | 5142 return error::kNoError; |
5144 } | 5143 } |
5145 | 5144 |
5146 error::Error GLES2DecoderImpl::HandleDeleteProgram(uint32 immediate_data_size, | 5145 error::Error GLES2DecoderImpl::HandleDeleteProgram(uint32 immediate_data_size, |
5147 const void* cmd_data) { | 5146 const void* cmd_data) { |
(...skipping 6973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12121 } | 12120 } |
12122 } | 12121 } |
12123 | 12122 |
12124 // Include the auto-generated part of this file. We split this because it means | 12123 // Include the auto-generated part of this file. We split this because it means |
12125 // we can easily edit the non-auto generated parts right here in this file | 12124 // we can easily edit the non-auto generated parts right here in this file |
12126 // instead of having to edit some template or the code generator. | 12125 // instead of having to edit some template or the code generator. |
12127 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 12126 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
12128 | 12127 |
12129 } // namespace gles2 | 12128 } // namespace gles2 |
12130 } // namespace gpu | 12129 } // namespace gpu |
OLD | NEW |