Switch dirty region tracking from bitmask to rects
Categories
(Core :: Graphics: WebRender, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: gw, Assigned: gw)
References
Details
Attachments
(1 file)
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Previously, we used a bitmask stored in the primitive visibility
state to determine which alpha batchers a primitive should be
added to, based on dirty regions.
The problem with this is that we had a limited number of bits that
could store visibility. If we overflowed that, all primitives that
touched any dirty rect would get added to the final bit group. This
was a performance cost in this edge case, but didn't affect the
correctness of rendering.
However, in future we'll have alpha tiles behind and in front of
compositor surfaces, if the compositor surface itself is not
opaque. This means we'll have more tiles that we need to add
prims to, and we must ensure the dirty rect tracking only adds
prims to tiles that the prim definitely belongs to.
This patch removes the bitmask, and instead stores a rect that
the prim occupies, which is intersected with the dirty rect
for the specific alpha batcher. No extra space in consumed in
the visibility state enum, as there was already padding in the
Detailed enum kind. There is a slight extra cost in terms of
the comparison for dirty primitives, but this is mitigated by
the ability to early out during Coarse -> Detailed prim visibility.
Long term, we want to change how tiles store this information so
that an index buffer is stored of dirty prims, negating the need
to walk the entire picture tree during batching.
Updated•4 years ago
|
Comment 3•4 years ago
|
||
Backed out for causing build bustages.
Backout link: https://hg.mozilla.org/integration/autoland/rev/da90998edb66783ee79908eab658328299847051
Failure log: https://treeherder.mozilla.org/logviewer?job_id=334215574&repo=autoland&lineNumber=8925
Comment 5•4 years ago
|
||
Relanded: https://hg.mozilla.org/integration/autoland/rev/2cfa8c3bb902f35d3d6b2794abb2c392542247a2
Sorry for the backout.
Comment 6•4 years ago
|
||
bugherder |
Assignee | ||
Updated•4 years ago
|
Description
•