Index: cc/output/gl_renderer.cc |
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc |
index c0cf1381adb9ac8e466cb44b723704aec225b767..28f0a49890a553cab56436207021c3d2fbf51608 100644 |
--- a/cc/output/gl_renderer.cc |
+++ b/cc/output/gl_renderer.cc |
@@ -182,6 +182,7 @@ GLRenderer::GLRenderer(RendererClient* client, |
is_backbuffer_discarded_(false), |
visible_(true), |
is_scissor_enabled_(false), |
+ scissor_rect_needs_reset_(true), |
stencil_shadow_(false), |
blend_shadow_(false), |
highp_threshold_min_(highp_threshold_min), |
@@ -2519,7 +2520,7 @@ void GLRenderer::SetScissorTestRect(gfx::Rect scissor_rect) { |
// Don't unnecessarily ask the context to change the scissor, because it |
// may cause undesired GPU pipeline flushes. |
- if (scissor_rect == scissor_rect_) |
+ if (scissor_rect == scissor_rect_ && !scissor_rect_needs_reset_) |
return; |
scissor_rect_ = scissor_rect; |
@@ -2529,6 +2530,8 @@ void GLRenderer::SetScissorTestRect(gfx::Rect scissor_rect) { |
scissor_rect.y(), |
scissor_rect.width(), |
scissor_rect.height())); |
+ |
+ scissor_rect_needs_reset_ = false; |
} |
void GLRenderer::SetDrawViewport(gfx::Rect window_space_viewport) { |
@@ -3005,6 +3008,7 @@ void GLRenderer::ReinitializeGLState() { |
// Make sure scissoring starts as disabled. |
is_scissor_enabled_ = false; |
GLC(context_, context_->disable(GL_SCISSOR_TEST)); |
+ scissor_rect_needs_reset_ = true; |
} |
bool GLRenderer::CanUseSkiaGPUBackend() const { |