Skip to content

DrawingCtx::draw_path - clear/recalculate path only when needed

John Ledbetter requested to merge johnl/librsvg:jl/paint-order-opt into master

Addresses #619 (closed)

In the default 'Fill, Stroke, Markers' paint order, there's no need to regenerate the draw path in between each step, only once at the start. We only need to re-generate the path if the paint-order specifies that the Markers step comes between Fill and Stroke.

Adjust fill & stroke to preserve the cairo path, only creating a new one if it has been unset to paint markers.

  • Remove redundant 'if clipping' check when painting; we never get to this match if we're clipping.
  • Convert clipping if/else to an early return to help de-indent the painting block.
Edited by John Ledbetter

Merge request reports