Bug 6564 - SVGPaintServer system needs to be redesigned to fill & stroke simultaneously
Summary: SVGPaintServer system needs to be redesigned to fill & stroke simultaneously
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P4 Normal
Assignee: Nobody
Depends on: 6553
  Show dependency treegraph
Reported: 2006-01-15 11:22 PST by Alexander Kellett
Modified: 2011-05-18 10:10 PDT (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kellett 2006-01-15 11:22:10 PST
KCanvas needs to be redesigned to fill & stroke at once

This is a continuation of 6553.

Items remaining:

1.  Update PaintServers to not paint directly, but rather have an apply(STROKE | FILL) method which 
applies their stoke/fill properties to the current context.
2.  Change RenderPathQuartz to call CGContextDrawPath, and thus both stroke and fill a path in a 
single call (large perf. gain).
Comment 1 Eric Seidel (no email) 2006-01-26 16:13:57 PST
This could be a big performance win on large SVGs.
Comment 2 Eric Seidel (no email) 2006-12-26 17:23:25 PST
This is nearly possible today.  Just a few adjustments would be necessary.  Here's some pseudo code:

fill = fillPaintServer()
stroke = strokePaintServer()

if (fill == stroke) {
    fill->renderPath(FILL_MODE | STROKE_MODE)
} else {

I'm not certain how huge of a performance win this would be, but now that we have an SVG PLT we can check. ;)
Comment 3 Dirk Schulze 2011-05-18 10:10:55 PDT
I doubt that it makes sense to implement it. We need to be able to apply different transforms to the context for fill or stroke (because of gradients, patterns, non-scaling-stroke). And IIRC this won't be able with drawing fill and stroke at once for CG. Also just CG could make use of this. Because of the cost to implement it and the fact that just CG could make use of it. I mark this as WONTFIX. Feel free to reopen the bug if you want to work on that.