| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| index e9aec35e7c55f2bcb144750e7013533fb6949897..6212d7fdbf357d1b22988ba6f48f4a8e4a55700b 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| @@ -2951,23 +2951,6 @@
|
| lose_context_when_out_of_memory_ =
|
| attrib_helper.lose_context_when_out_of_memory;
|
|
|
| - // If the failIfMajorPerformanceCaveat context creation attribute was true
|
| - // and we are using a software renderer, fail.
|
| - if (attrib_helper.fail_if_major_perf_caveat &&
|
| - feature_info_->feature_flags().is_swiftshader) {
|
| - group_ = NULL; // Must not destroy ContextGroup if it is not initialized.
|
| - Destroy(true);
|
| - return false;
|
| - }
|
| -
|
| - if (!group_->Initialize(this, attrib_helper.context_type,
|
| - disallowed_features)) {
|
| - group_ = NULL; // Must not destroy ContextGroup if it is not initialized.
|
| - Destroy(true);
|
| - return false;
|
| - }
|
| - CHECK_GL_ERROR();
|
| -
|
| should_use_native_gmb_for_backbuffer_ =
|
| attrib_helper.should_use_native_gmb_for_backbuffer;
|
| if (should_use_native_gmb_for_backbuffer_) {
|
| @@ -2987,10 +2970,28 @@
|
| }
|
|
|
| if (!supported) {
|
| + group_ = NULL; // Must not destroy ContextGroup if it is not initialized.
|
| Destroy(true);
|
| return false;
|
| }
|
| }
|
| +
|
| + // If the failIfMajorPerformanceCaveat context creation attribute was true
|
| + // and we are using a software renderer, fail.
|
| + if (attrib_helper.fail_if_major_perf_caveat &&
|
| + feature_info_->feature_flags().is_swiftshader) {
|
| + group_ = NULL; // Must not destroy ContextGroup if it is not initialized.
|
| + Destroy(true);
|
| + return false;
|
| + }
|
| +
|
| + if (!group_->Initialize(this, attrib_helper.context_type,
|
| + disallowed_features)) {
|
| + group_ = NULL; // Must not destroy ContextGroup if it is not initialized.
|
| + Destroy(true);
|
| + return false;
|
| + }
|
| + CHECK_GL_ERROR();
|
|
|
| bool needs_emulation = feature_info_->gl_version_info().IsLowerThanGL(4, 2);
|
| transform_feedback_manager_.reset(new TransformFeedbackManager(
|
|
|