Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upReduce need for full world rect calculation for primitives. #3313
Conversation
The fewer places that rely on a full world rect, the easier it is to do clustered culling, where we accept / reject primitives in groups. The main use for world rects of primitivs is overlap calculations during batching. Instead, switch to use the surface relative rect for batching. This is safe since we know that when we merge batches from different surfaces, they will never be overlapping in the allocated render target. Other changes: * Refactor the initial picture traversal to use a state object that maintains an internal stack of picture / surface info. This is easier to reason about, and will be helpful once we start using this to pass information about caching state. * Use world rect rather than clipped prim world rect for bounds during plane-splitting. This was landed previously but backed out due to an unrelated bug in that patch. * Change get_raster_rects to not calculate the transform, since most uses of this method don't require it. * Change conservative tiling calculations to use the world rect for bounds instead of clipped prim rect. All we're trying to do here is reject tiles outside the viewport, so this simplifies the code and removes the need for the primitive world rect in one more location.
|
This extracts some of the simpler parts from #3309 in order to hopefully get them landed first. Pending try: |
|
Despite the amount of orange on the try run, I think this looks OK. There is one WR related crash in |
|
|
In try push:
As for the crash, the "known" one, as far as I'm aware is the failed "invalid parent!" expectation. Your case is slightly different, not to mention that I didn't expect the old one to show up on CI (seemed deterministic, cc @aosmond ). |
|
Thanks for the double check! The wpt6 run definitely looks unrelated. The Wr1 fail is one I see regularly, and it looks like there are intermittent bugs filed for it. The crash that I'm talking about is https://bugzilla.mozilla.org/show_bug.cgi?id=1502717 - it's an intermittent array out of bounds error, which is the same as occurred here (and only occurred in one of the test configs). |
|
@bors-servo r+ |
|
|
Reduce need for full world rect calculation for primitives. The fewer places that rely on a full world rect, the easier it is to do clustered culling, where we accept / reject primitives in groups. The main use for world rects of primitivs is overlap calculations during batching. Instead, switch to use the surface relative rect for batching. This is safe since we know that when we merge batches from different surfaces, they will never be overlapping in the allocated render target. Other changes: * Refactor the initial picture traversal to use a state object that maintains an internal stack of picture / surface info. This is easier to reason about, and will be helpful once we start using this to pass information about caching state. * Use world rect rather than clipped prim world rect for bounds during plane-splitting. This was landed previously but backed out due to an unrelated bug in that patch. * Change get_raster_rects to not calculate the transform, since most uses of this method don't require it. * Change conservative tiling calculations to use the world rect for bounds instead of clipped prim rect. All we're trying to do here is reject tiles outside the viewport, so this simplifies the code and removes the need for the primitive world rect in one more location. <!-- 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/3313) <!-- Reviewable:end -->
|
|
gw3583 commentedNov 15, 2018
•
edited by larsbergstrom
The fewer places that rely on a full world rect, the easier it
is to do clustered culling, where we accept / reject primitives
in groups.
The main use for world rects of primitivs is overlap calculations
during batching. Instead, switch to use the surface relative rect
for batching. This is safe since we know that when we merge batches
from different surfaces, they will never be overlapping in the
allocated render target.
Other changes:
that maintains an internal stack of picture / surface info.
This is easier to reason about, and will be helpful once we
start using this to pass information about caching state.
during plane-splitting. This was landed previously but
backed out due to an unrelated bug in that patch.
most uses of this method don't require it.
for bounds instead of clipped prim rect. All we're trying to
do here is reject tiles outside the viewport, so this simplifies
the code and removes the need for the primitive world rect in
one more location.
This change is