| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |