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

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

Issue 1168213003: gpu: Make sure we restore scissor rect after clearing a texture level. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enable scissor test in UnClearedAttachmentsGetClearedOnClear Created 5 years, 6 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f2db39fce59d224f5c1faeabb9306f7eec10f827..859bf2d3030d5a779ea3a6e9c49b724bb2e1b30e 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -5696,9 +5696,10 @@ void GLES2DecoderImpl::RestoreClearState() {
state_.color_clear_alpha);
glClearStencil(state_.stencil_clear);
glClearDepth(state_.depth_clear);
- if (state_.enable_flags.scissor_test) {
- state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, true);
- }
+ state_.SetDeviceCapabilityState(GL_SCISSOR_TEST,
+ state_.enable_flags.scissor_test);
+ glScissor(state_.scissor_x, state_.scissor_y, state_.scissor_width,
+ state_.scissor_height);
}
GLenum GLES2DecoderImpl::DoCheckFramebufferStatus(GLenum target) {
@@ -8935,7 +8936,6 @@ bool GLES2DecoderImpl::ClearLevel(Texture* texture,
glScissor(xoffset, yoffset, width, height);
glClear(GL_DEPTH_BUFFER_BIT | (have_stencil ? GL_STENCIL_BUFFER_BIT : 0));
- state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, false);
RestoreClearState();
glDeleteFramebuffersEXT(1, &fb);
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698