Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(435)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1783763002: [WebGL 2] primitive restart should be always enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 5a0bfcb6f9ff5b278fd104149c67f368b88ac648..36ea276d22e58a87426bc757cb907a0a8d888a7c 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -6157,12 +6157,18 @@ void GLES2DecoderImpl::DoDisable(GLenum cap) {
if (SetCapabilityState(cap, false)) {
glDisable(cap);
}
+ if (cap == GL_PRIMITIVE_RESTART_FIXED_INDEX) {
+ buffer_manager()->SetPrimitiveRestartState(false);
+ }
}
void GLES2DecoderImpl::DoEnable(GLenum cap) {
if (SetCapabilityState(cap, true)) {
glEnable(cap);
}
+ if (cap == GL_PRIMITIVE_RESTART_FIXED_INDEX) {
+ buffer_manager()->SetPrimitiveRestartState(true);
+ }
}
void GLES2DecoderImpl::DoDepthRangef(GLclampf znear, GLclampf zfar) {

Powered by Google App Engine
This is Rietveld 408576698