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

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

Issue 2449993005: Remove GLImage::Destroy(). (Closed)
Patch Set: One more Destroy() call on Mac. Created 4 years, 1 month 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
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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_passthrough.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h"
6 6
7 #include "gpu/command_buffer/service/feature_info.h" 7 #include "gpu/command_buffer/service/feature_info.h"
8 #include "gpu/command_buffer/service/gl_utils.h" 8 #include "gpu/command_buffer/service/gl_utils.h"
9 #include "ui/gl/gl_version_info.h" 9 #include "ui/gl/gl_version_info.h"
10 10
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &num_texture_units); 170 glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &num_texture_units);
171 171
172 active_texture_unit_ = 0; 172 active_texture_unit_ = 0;
173 bound_textures_.resize(num_texture_units, 0); 173 bound_textures_.resize(num_texture_units, 0);
174 174
175 set_initialized(); 175 set_initialized();
176 return true; 176 return true;
177 } 177 }
178 178
179 void GLES2DecoderPassthroughImpl::Destroy(bool have_context) { 179 void GLES2DecoderPassthroughImpl::Destroy(bool have_context) {
180 if (image_manager_.get()) { 180 image_manager_.reset();
181 image_manager_->Destroy(have_context);
182 image_manager_.reset();
183 }
184 181
185 DeleteServiceObjects( 182 DeleteServiceObjects(
186 &framebuffer_id_map_, have_context, 183 &framebuffer_id_map_, have_context,
187 [](GLuint framebuffer) { glDeleteFramebuffersEXT(1, &framebuffer); }); 184 [](GLuint framebuffer) { glDeleteFramebuffersEXT(1, &framebuffer); });
188 DeleteServiceObjects(&transform_feedback_id_map_, have_context, 185 DeleteServiceObjects(&transform_feedback_id_map_, have_context,
189 [](GLuint transform_feedback) { 186 [](GLuint transform_feedback) {
190 glDeleteTransformFeedbacks(1, &transform_feedback); 187 glDeleteTransformFeedbacks(1, &transform_feedback);
191 }); 188 });
192 DeleteServiceObjects(&query_id_map_, have_context, 189 DeleteServiceObjects(&query_id_map_, have_context,
193 [](GLuint query) { glDeleteQueries(1, &query); }); 190 [](GLuint query) { glDeleteQueries(1, &query); });
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 }, /* NOLINT */ 521 }, /* NOLINT */
525 522
526 const GLES2DecoderPassthroughImpl::CommandInfo 523 const GLES2DecoderPassthroughImpl::CommandInfo
527 GLES2DecoderPassthroughImpl::command_info[] = { 524 GLES2DecoderPassthroughImpl::command_info[] = {
528 GLES2_COMMAND_LIST(GLES2_CMD_OP)}; 525 GLES2_COMMAND_LIST(GLES2_CMD_OP)};
529 526
530 #undef GLES2_CMD_OP 527 #undef GLES2_CMD_OP
531 528
532 } // namespace gles2 529 } // namespace gles2
533 } // namespace gpu 530 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698