| Index: cc/output/gl_renderer.cc
|
| diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
|
| index 10014f8b89d9ab4d1fb9805210e8ac5176652a2a..f34eb18f6644fed9f988c7139294e1588d856805 100644
|
| --- a/cc/output/gl_renderer.cc
|
| +++ b/cc/output/gl_renderer.cc
|
| @@ -168,6 +168,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),
|
| @@ -2486,7 +2487,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;
|
| @@ -2496,6 +2497,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) {
|
| @@ -2946,6 +2949,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 {
|
|
|