[cairo] Solving the self-intersecting stroke
Behdad Esfahbod
behdad at behdad.org
Wed Oct 1 12:23:07 PDT 2008
Chris Wilson wrote:
> Hi guys,
> I've pushed to git+ssh://annarchy.freedesktop.org/~ickle/cairo a
> self-intersecting branch which contains a method to remove overlapping
> trapezoids from cairo_traps_t. This solves the self-intersecting problem
> at a cost of re-running the general Bentley-Ottmann tessellator over the
> entire input.
Very nice job Chris!
I reran my twin-font tests against it. It shows some new bugs, but also fixes
the rendering glitches I was seeing before:
BEFORE:
http://www.gnome.org/~behdad/cairo/twin20080925.png
AFTER:
http://www.gnome.org/~behdad/cairo/twin-ickle.png
Zoom in on the 'E' in large sizes and see how the glitches on the left side
where the middle stem joins is not there anymore.
Cheers,
behdad
>>From a totally unbiased perspective ;-), cairo's output looks a look
> better with far fewer bright pixels around curves and joints. See the
> dash-curve images for an example.
>
> One major unresolved issue is what appears to be a loss of precision
> when computing the vertices of the trapezoids for constructing the edge
> list for the second pass of the tessellator. For a good example look at
> the single pixel discrepancy inside the round end-cap around the middle
> of the dash-caps-join image. I'm still deciding the cause of the
> differences in the antialiasing, particularly if it is indeed correctly
> removing overlap of small trapezoid around the edge.
>
> Initial estimates for the performance impact are:
>
> Speedups
> ========
> image-rgb paint_similar_rgb_over-256 0.16 0.55% -> 0.12
> 1.28%:
> 1.36x speedup
> ▍
> image-rgb paint_similar_rgb_source-256 0.16 2.20% -> 0.12
> 0.88%:
> 1.34x speedup
> ▍
> image-rgba paint_similar_rgba_source-256 0.15 1.25% -> 0.12
> 1.84%:
> 1.31x speedup
> ▎
> image-rgba subimage_copy-128 0.00 0.37% -> 0.00
> 0.00%:
> 1.14x speedup
> ▏
> image-rgba subimage_copy-64 0.00 0.35% -> 0.00
> 0.00%:
> 1.14x speedup
> ▏
> image-rgba subimage_copy-512 0.00 0.12% -> 0.00
> 0.15%:
> 1.14x speedup
> ▏
> ...
>
> Slowdowns
> =========
> image-rgb world_map-800 154.42 0.11% -> 898.37
> 0.25%:
> 5.81x slowdown
> ████▉
> image-rgba world_map-800 154.65 0.09% -> 899.50
> 0.40%:
> 5.80x slowdown
> ████▊
> image-rgb zrusin_another_fill-415 5.57 1.79% -> 15.40
> 1.07%:
> 2.79x slowdown
> █▊
> image-rgba zrusin_another_fill-415 5.57 1.54% -> 15.13
> 0.99%:
> 2.78x slowdown
> █▊
> image-rgb stroke_solid_rgb_over-64 0.39 1.24% -> 0.77
> 0.25%:
> 2.05x slowdown
> █
> image-rgba stroke_solid_rgb_over-64 0.38 1.32% -> 0.77
> 0.26%:
> 2.05x slowdown
> █
> ... lots more
>
>
> So... Joonas, how's your polygon rasteriser?
>
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
More information about the cairo
mailing list