| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 171 |
| 172 mailbox_manager_ = group_->mailbox_manager(); | 172 mailbox_manager_ = group_->mailbox_manager(); |
| 173 | 173 |
| 174 // Query information about the texture units | 174 // Query information about the texture units |
| 175 GLint num_texture_units = 0; | 175 GLint num_texture_units = 0; |
| 176 glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &num_texture_units); | 176 glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &num_texture_units); |
| 177 | 177 |
| 178 active_texture_unit_ = 0; | 178 active_texture_unit_ = 0; |
| 179 bound_textures_.resize(num_texture_units, 0); | 179 bound_textures_.resize(num_texture_units, 0); |
| 180 | 180 |
| 181 if (group_->gpu_preferences().enable_gpu_driver_debug_logging && |
| 182 feature_info_->feature_flags().khr_debug) { |
| 183 InitializeGLDebugLogging(); |
| 184 } |
| 185 |
| 181 set_initialized(); | 186 set_initialized(); |
| 182 return true; | 187 return true; |
| 183 } | 188 } |
| 184 | 189 |
| 185 void GLES2DecoderPassthroughImpl::Destroy(bool have_context) { | 190 void GLES2DecoderPassthroughImpl::Destroy(bool have_context) { |
| 186 image_manager_.reset(); | 191 image_manager_.reset(); |
| 187 | 192 |
| 188 DeleteServiceObjects( | 193 DeleteServiceObjects( |
| 189 &framebuffer_id_map_, have_context, | 194 &framebuffer_id_map_, have_context, |
| 190 [](GLuint framebuffer) { glDeleteFramebuffersEXT(1, &framebuffer); }); | 195 [](GLuint framebuffer) { glDeleteFramebuffersEXT(1, &framebuffer); }); |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 }, /* NOLINT */ | 532 }, /* NOLINT */ |
| 528 | 533 |
| 529 const GLES2DecoderPassthroughImpl::CommandInfo | 534 const GLES2DecoderPassthroughImpl::CommandInfo |
| 530 GLES2DecoderPassthroughImpl::command_info[] = { | 535 GLES2DecoderPassthroughImpl::command_info[] = { |
| 531 GLES2_COMMAND_LIST(GLES2_CMD_OP)}; | 536 GLES2_COMMAND_LIST(GLES2_CMD_OP)}; |
| 532 | 537 |
| 533 #undef GLES2_CMD_OP | 538 #undef GLES2_CMD_OP |
| 534 | 539 |
| 535 } // namespace gles2 | 540 } // namespace gles2 |
| 536 } // namespace gpu | 541 } // namespace gpu |
| OLD | NEW |