Skip to content

Use a StackingContext to do less work in DrawingCtx::with_discrete_layer

DrawingCtx::with_discrete_layer is the function that embodies the SVG rendering model: conceptually, in order it renders, filters, clips, masks, and applies opacity before compositing onto the result.

That function does a lot of work to extract the filter/mask/etc. and validate them.

This MR introduces StackingContext, which is the SVG spec's name for more or less what we do in that function. I hope that this struct can become part of a layout tree.

Merge request reports