Commit 906f6315 authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

Fix flickering sticky element during scroll

We should invalidate the tilings only when we are updating tiles for
the sync tree.

Bug: 1110872d
Change-Id: Id00da58c78bf86423eba368085b9a3a75b855e92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2344808
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796547}
parent 4d9f6afe
......@@ -1207,8 +1207,10 @@ void PictureLayerImpl::UpdateTilingsForRasterScaleAndTranslation(
gfx::Vector2dF raster_translation =
CalculateRasterTranslation(raster_contents_scale_);
if (high_res) {
if (high_res->raster_transform().translation() != raster_translation) {
// We should recreate the high res tiling with the new raster translation.
if (high_res->raster_transform().translation() != raster_translation &&
layer_tree_impl()->IsSyncTree()) {
// We should recreate the high res tiling with the new raster translation,
// which is for the sync tree only to avoid flickering.
tilings_->Remove(high_res);
high_res = nullptr;
} else if (!adjusted_raster_scale) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment