[cairo] Performance of rendering long, angled lines in Cairo
cworth at cworth.org
Fri Oct 31 13:03:23 PDT 2008
On Fri, 2008-10-31 at 12:41 -0700, Vladimir Vukicevic wrote:
> But since you're hitting the general case, the first thing that happens
> is that a large temporary surface big enough to encompass the set of
> trapezoids to be rendered is created -- in your case somewhere around
> 1200 x 950. The trapezoids are rendered to that, and then that surface
> is used as a mask for the final filling operation. You can see the
> problem -- that's a large surface, and you're both rendering to it and
> then compositing with it, not to mention creating/destroying it just to
> execute that simple stroke!
Ah, of course. Thanks for explaining that Vlad.
> For the diagonal case, it's not possible to optimize it as rectangular
> fills, so you end up creating the large temporary surface which can
> contain the entire diagonal line (which is essentially the worst case
> big-diagonal-lines would actually make a great perf test...
Yes, we definitely need to do better on that. Even without a big change
to the rasterizer it should be obvious that even just breaking up the
geometry into smaller segments would perform much better, (as the
smaller intermediate masks would no longer include large regions of
useless compositing). So we should start tracking this in cairo-perf and
see what we can do to make this case faster in cairo itself, (without
the application needing to slice up its geometry in silly ways).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.cairographics.org/archives/cairo/attachments/20081031/4a9e3c86/attachment-0001.pgp
More information about the cairo