| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 if (!group_->Initialize(this, attrib_helper.context_type, | 165 if (!group_->Initialize(this, attrib_helper.context_type, |
| 166 disallowed_features)) { | 166 disallowed_features)) { |
| 167 group_ = NULL; // Must not destroy ContextGroup if it is not initialized. | 167 group_ = NULL; // Must not destroy ContextGroup if it is not initialized. |
| 168 Destroy(true); | 168 Destroy(true); |
| 169 return false; | 169 return false; |
| 170 } | 170 } |
| 171 | 171 |
| 172 // Check for required extensions | 172 // Check for required extensions |
| 173 if (!feature_info_->feature_flags().angle_robust_client_memory || | 173 if (!feature_info_->feature_flags().angle_robust_client_memory || |
| 174 !feature_info_->feature_flags().chromium_bind_generates_resource || | 174 !feature_info_->feature_flags().chromium_bind_generates_resource) { |
| 175 (feature_info_->IsWebGLContext() != | 175 // TODO(geofflang): Verify that ANGLE_webgl_compatibility is enabled if this |
| 176 feature_info_->feature_flags().angle_webgl_compatibility)) { | 176 // is a WebGL context (depends on crbug.com/671217). |
| 177 Destroy(true); | 177 Destroy(true); |
| 178 return false; | 178 return false; |
| 179 } | 179 } |
| 180 | 180 |
| 181 image_manager_.reset(new ImageManager()); | 181 image_manager_.reset(new ImageManager()); |
| 182 | 182 |
| 183 bind_generates_resource_ = group_->bind_generates_resource(); | 183 bind_generates_resource_ = group_->bind_generates_resource(); |
| 184 | 184 |
| 185 resources_ = group_->passthrough_resources(); | 185 resources_ = group_->passthrough_resources(); |
| 186 | 186 |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 }, /* NOLINT */ | 840 }, /* NOLINT */ |
| 841 | 841 |
| 842 const GLES2DecoderPassthroughImpl::CommandInfo | 842 const GLES2DecoderPassthroughImpl::CommandInfo |
| 843 GLES2DecoderPassthroughImpl::command_info[] = { | 843 GLES2DecoderPassthroughImpl::command_info[] = { |
| 844 GLES2_COMMAND_LIST(GLES2_CMD_OP)}; | 844 GLES2_COMMAND_LIST(GLES2_CMD_OP)}; |
| 845 | 845 |
| 846 #undef GLES2_CMD_OP | 846 #undef GLES2_CMD_OP |
| 847 | 847 |
| 848 } // namespace gles2 | 848 } // namespace gles2 |
| 849 } // namespace gpu | 849 } // namespace gpu |
| OLD | NEW |