Bug 1769464 - Fix backdrop-filter invalidation r=gfx-reviewers,lsalzman
Bug 1769464 - Fix backdrop-filter invalidation r=gfx-reviewers,lsalzman

Since primitives are not passed through the backdrop-filter chain
they may be part of during update_prim_dependencies, they may not
expand their coverage rect to the entire coverage rect of the
backdrop-filter primitive that they affect.

In rare cases, this can result in incorrect invalidation where the
edges of a blurred primitive may not invalidate a (partial) tile
when the primitive no longer intersects with that tile.

To handle this correctly, we defer checks on the backdrop filter
validity until we've calculated the dirty rects for all tiles
that are affected by that filter. Then, if any of those regions
are dirty, we invalidate the backdrop-filter primitive region.

In future, it may be better to pass the primitive through both
its standard surface chain, and also the surface chain of the
backdrop-filter. However, this would be quite an involved change
to make, and it's not clear right now if it would be better than
just deferring and invalidating the backdrop-filter prim.

Differential Revision: https://phabricator.services.mozilla.com/D146388

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/8944e68eee695071c0dc0d775742b0802d1d840f

servo/webrender,servo/webrender,servo/webrender,servo/webrender,servo/webrender,servo/webrender