Skip to content

Commit

Permalink
SetDidCheckerboardQuad to false when not in scroll
Browse files Browse the repository at this point in the history
This change fixes an issue where did_checkerboard_quad_ will get set to
false during a scroll if the preceding frame did not have any
checkerboarding. Instead, we now only set the flag to false during
AppendQuads if the browser is not in the middle of a scroll interaction.

This will allow us to stay in "increased preraster mode" for the
duration of the scroll to reduce chances of checkerboarding.

Bug: 1062662
Change-Id: I5cb4c3bd1ef4b2f47adc16245079ae45b198f682
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2837727
Reviewed-by: vmpstr <vmpstr@chromium.org>
Commit-Queue: Sahir Vellani <sahir.vellani@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#874357}
  • Loading branch information
sahirv authored and Chromium LUCI CQ committed Apr 20, 2021
1 parent 29ebe9c commit 2dedb7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cc/layers/picture_layer_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ void PictureLayerImpl::AppendQuads(viz::CompositorRenderPass* render_pass,
viz::SharedQuadState* shared_quad_state =
render_pass->CreateAndAppendSharedQuadState();

SetDidCheckerboardQuad(false);
// If did_checkerboard_quad_ is set to true, don't set to false until the
// scroll is completed.
if (!ScrollInteractionInProgress())
SetDidCheckerboardQuad(false);

if (raster_source_->IsSolidColor()) {
// TODO(979672): This is still hard-coded at 1.0. This has some history:
Expand Down

0 comments on commit 2dedb7e

Please sign in to comment.