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 #3381 - gw3583:seg-fix-1, r=kvark
Remove most use of the local prim rect by primitive templates. The current picture caching code invalidates cached regions more than expected, due to how gecko handles scroll offsets. If a display list is received, then a scroll event occurs, and then a new display list is sent, the local rects will contain different coordinates, since the scroll offsets are baked into the local rects rather than in the scroll / reference frames. This results in primitives being interned with a different value, and cached surfaces being incorrectly invalidated. Since the way this works is non-trivial to change in Gecko, we need to handle this in WR. If we change primitive and clip keys and templates to store their rectangles in a true local primitive space (where the origin is always zero) then the interning will work as expected. To do this, we'll store the origin of a primitive in the instance, and only the size in the template. A side benefit of this approach is that test cases like dl_mutate will become much faster, since the only difference between the thousands of rectangles is the origin. This will effectively allow true instancing of primitives with common data. This is the first step towards that - by removing reliance of the primitive local rect from the primitive template code. The rest will be done as a series of incremental patches. <!-- 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/3381) <!-- Reviewable:end -->
- Loading branch information
Showing
2 changed files
with
24 additions
and
33 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