Index: gpu/command_buffer/service/context_state.cc |
diff --git a/gpu/command_buffer/service/context_state.cc b/gpu/command_buffer/service/context_state.cc |
index 85cde3bfab3297f1782f67c74860de1c61d7c6cf..f91e8ccb9b1582e805a0ce9986b3954ba9768d96 100644 |
--- a/gpu/command_buffer/service/context_state.cc |
+++ b/gpu/command_buffer/service/context_state.cc |
@@ -434,9 +434,10 @@ ErrorState* ContextState::GetErrorState() { |
} |
void ContextState::EnableDisable(GLenum pname, bool enable) const { |
- if (pname == GL_PRIMITIVE_RESTART_FIXED_INDEX) { |
- if (feature_info_->feature_flags().emulate_primitive_restart_fixed_index) |
- pname = GL_PRIMITIVE_RESTART; |
+ if (pname == GL_PRIMITIVE_RESTART_FIXED_INDEX && |
+ feature_info_->feature_flags().emulate_primitive_restart_fixed_index) { |
+ // GLES2DecoderImpl::DoDrawElements can handle this situation |
+ return; |
} |
if (enable) { |
glEnable(pname); |