Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #3407 - gw3583:new-tile-deps-8, r=kvark
Support picture caching where content rect moves between display lists. Gecko bakes scroll offsets into new display lists. Consider the following example: (a) WR receives a new display list. (b) Scroll the display list, generating frames but not a new scene. (c) Generate a new scene, due to hover / click etc. In this case, the local coordinates of the primitives (and thus the enclosing content rect) will be different between (a) and (c), due to the current scroll offsets being baked into the local primitive rects. Since this is non-trivial to change in Gecko, we need to ensure that picture caching handles this case correctly. There are two parts to this: (a) Interned primitives must be stored and keyed in a true primitive local space, removing the local origin. Patches for this have already landed, and provide an optimization in cases where the same primitive template is instanced multiple times. (b) Correctly create cache tiles even if the enclosing content rect has different coordinates. This is addressed by this patch. We need to ensure that when generating tiles for a given content rect the number of tiles (and local offsets) is the same for identical content, regardless of the location of the content rect. To do this, we need to know the local bounding rect of the enclosing content, and make tiles placed relative to that. This moves the tile cache update pass to be done *after* the initial picture traversal, so we know the content bounding rect. This also means we can reconfigure the tile grid once during update_transforms, rather than checking after adding each primitive whether we need to re-allocate the tile grid. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/3407) <!-- Reviewable:end -->
- Loading branch information
Showing
6 changed files
with
244 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.