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

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

Issue 2689673004: Flush errors when destroying a passthrough command decoder. (Closed)
Patch Set: Created 3 years, 10 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
« 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) 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 if (group_->gpu_preferences().enable_gpu_driver_debug_logging && 201 if (group_->gpu_preferences().enable_gpu_driver_debug_logging &&
202 feature_info_->feature_flags().khr_debug) { 202 feature_info_->feature_flags().khr_debug) {
203 InitializeGLDebugLogging(); 203 InitializeGLDebugLogging();
204 } 204 }
205 205
206 set_initialized(); 206 set_initialized();
207 return true; 207 return true;
208 } 208 }
209 209
210 void GLES2DecoderPassthroughImpl::Destroy(bool have_context) { 210 void GLES2DecoderPassthroughImpl::Destroy(bool have_context) {
211 if (have_context) {
212 FlushErrors();
213 }
214
211 image_manager_.reset(); 215 image_manager_.reset();
212 216
213 DeleteServiceObjects( 217 DeleteServiceObjects(
214 &framebuffer_id_map_, have_context, 218 &framebuffer_id_map_, have_context,
215 [](GLuint framebuffer) { glDeleteFramebuffersEXT(1, &framebuffer); }); 219 [](GLuint framebuffer) { glDeleteFramebuffersEXT(1, &framebuffer); });
216 DeleteServiceObjects(&transform_feedback_id_map_, have_context, 220 DeleteServiceObjects(&transform_feedback_id_map_, have_context,
217 [](GLuint transform_feedback) { 221 [](GLuint transform_feedback) {
218 glDeleteTransformFeedbacks(1, &transform_feedback); 222 glDeleteTransformFeedbacks(1, &transform_feedback);
219 }); 223 });
220 DeleteServiceObjects(&query_id_map_, have_context, 224 DeleteServiceObjects(&query_id_map_, have_context,
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 }, /* NOLINT */ 853 }, /* NOLINT */
850 854
851 const GLES2DecoderPassthroughImpl::CommandInfo 855 const GLES2DecoderPassthroughImpl::CommandInfo
852 GLES2DecoderPassthroughImpl::command_info[] = { 856 GLES2DecoderPassthroughImpl::command_info[] = {
853 GLES2_COMMAND_LIST(GLES2_CMD_OP)}; 857 GLES2_COMMAND_LIST(GLES2_CMD_OP)};
854 858
855 #undef GLES2_CMD_OP 859 #undef GLES2_CMD_OP
856 860
857 } // namespace gles2 861 } // namespace gles2
858 } // namespace gpu 862 } // 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