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 up[RFC] Improved Clipping #1656
[RFC] Improved Clipping #1656
Comments
Review part 1/N
I'm not sure this is the most efficient way to render the inherited stack clips. Consider the hierarchy:
We wouldn't want to repeat rendering SC1 clips for primitives 2 and 3. Instead, it would be great to re-use the SC1 rendered clips as a base for SC2 clips. Optimally, the pipeline would do:
Doing that would allow us to re-use the SC1 clip result without even copying it over (like we used to do initially, because that's how our render tasks are organized). Of course, one can argue that this use case is not often seen. But we came here because of artificial benchmarks being slog in the first place, so... |
Review part 2/N
You don't want to let tiles rest in peace, do you? :D E.g. we could have a screen-space stencil buffer, where the values are going to represent the stacking contexts that affect it (not totally sure how, perhaps by the depth of SC? needs more thought). Somewhere close to the start of the frame we could draw bounding boxes of the primitives (not the exact primitives - they are too heavy) to the stencil, and then we can stencil out when rendering clips into it. Of course, we'd still allocate all the space, so that may be a problem. |
|
I think we can call this resolved now - any future clip mask work will be based on the work done in #2146. |
by @glennw
https://github.com/servo/webrender/wiki/Improved-clipping