| 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 "base/strings/string_split.h" |
| 7 #include "gpu/command_buffer/service/feature_info.h" | 8 #include "gpu/command_buffer/service/feature_info.h" |
| 8 #include "gpu/command_buffer/service/gl_utils.h" | 9 #include "gpu/command_buffer/service/gl_utils.h" |
| 9 #include "ui/gl/gl_version_info.h" | 10 #include "ui/gl/gl_version_info.h" |
| 10 | 11 |
| 11 namespace gpu { | 12 namespace gpu { |
| 12 namespace gles2 { | 13 namespace gles2 { |
| 13 | 14 |
| 14 namespace { | 15 namespace { |
| 15 template <typename ClientType, typename ServiceType, typename DeleteFunction> | 16 template <typename ClientType, typename ServiceType, typename DeleteFunction> |
| 16 void DeleteServiceObjects(ClientServiceMap<ClientType, ServiceType>* id_map, | 17 void DeleteServiceObjects(ClientServiceMap<ClientType, ServiceType>* id_map, |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 167 |
| 167 if (!group_->Initialize(this, attrib_helper.context_type, | 168 if (!group_->Initialize(this, attrib_helper.context_type, |
| 168 disallowed_features)) { | 169 disallowed_features)) { |
| 169 group_ = NULL; // Must not destroy ContextGroup if it is not initialized. | 170 group_ = NULL; // Must not destroy ContextGroup if it is not initialized. |
| 170 Destroy(true); | 171 Destroy(true); |
| 171 return false; | 172 return false; |
| 172 } | 173 } |
| 173 | 174 |
| 174 // Check for required extensions | 175 // Check for required extensions |
| 175 if (!feature_info_->feature_flags().angle_robust_client_memory || | 176 if (!feature_info_->feature_flags().angle_robust_client_memory || |
| 176 !feature_info_->feature_flags().chromium_bind_generates_resource) { | 177 !feature_info_->feature_flags().chromium_bind_generates_resource || |
| 178 !feature_info_->feature_flags().chromium_copy_texture || |
| 179 !feature_info_->feature_flags().chromium_copy_compressed_texture) { |
| 177 // TODO(geofflang): Verify that ANGLE_webgl_compatibility is enabled if this | 180 // TODO(geofflang): Verify that ANGLE_webgl_compatibility is enabled if this |
| 178 // is a WebGL context (depends on crbug.com/671217). | 181 // is a WebGL context (depends on crbug.com/671217). |
| 179 Destroy(true); | 182 Destroy(true); |
| 180 return false; | 183 return false; |
| 181 } | 184 } |
| 182 | 185 |
| 183 image_manager_.reset(new ImageManager()); | 186 image_manager_.reset(new ImageManager()); |
| 184 | 187 |
| 185 bind_generates_resource_ = group_->bind_generates_resource(); | 188 bind_generates_resource_ = group_->bind_generates_resource(); |
| 186 | 189 |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 }, /* NOLINT */ | 858 }, /* NOLINT */ |
| 856 | 859 |
| 857 const GLES2DecoderPassthroughImpl::CommandInfo | 860 const GLES2DecoderPassthroughImpl::CommandInfo |
| 858 GLES2DecoderPassthroughImpl::command_info[] = { | 861 GLES2DecoderPassthroughImpl::command_info[] = { |
| 859 GLES2_COMMAND_LIST(GLES2_CMD_OP)}; | 862 GLES2_COMMAND_LIST(GLES2_CMD_OP)}; |
| 860 | 863 |
| 861 #undef GLES2_CMD_OP | 864 #undef GLES2_CMD_OP |
| 862 | 865 |
| 863 } // namespace gles2 | 866 } // namespace gles2 |
| 864 } // namespace gpu | 867 } // namespace gpu |
| OLD | NEW |