Android: Extend QualComm scissor bug workaround
This extends the workaround from
https://codereview.chromium.org/11734037/
Apparently, the driver also applies an incorrect scissor after we change the texture to FBO binding with glFramebufferTexture2D().
BUG=188600
NOTRY=True
Review URL: https://codereview.chromium.org/12566032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188232 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 0d6ba07..5e3bea65d 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -3790,6 +3790,7 @@
void GLES2DecoderImpl::OnFboChanged() const {
if (workarounds().restore_scissor_on_fbo_change)
+ // The driver forgets the correct scissor when modifying the FBO binding.
glScissor(state_.scissor_x, state_.scissor_y,
state_.scissor_width, state_.scissor_height);
}
@@ -4810,6 +4811,7 @@
if (framebuffer == state_.bound_draw_framebuffer) {
clear_state_dirty_ = true;
}
+ OnFboChanged();
}
void GLES2DecoderImpl::DoDisable(GLenum cap) {
@@ -4968,6 +4970,7 @@
if (framebuffer == state_.bound_draw_framebuffer) {
clear_state_dirty_ = true;
}
+ OnFboChanged();
}
void GLES2DecoderImpl::DoGetFramebufferAttachmentParameteriv(