[cairo] Analytical curve bounds

Kalle Vahlman kalle.vahlman at gmail.com
Mon Dec 29 09:07:25 PST 2008


2008/12/28 Behdad Esfahbod <behdad at behdad.org>:
> Hi,
>
> I just pushed a commit to use analytical curve bounds instead of decomposing
> them.  Would be good to get some perf data.  Here is the commit message:
>
> commit ef0f6c3ca311c41c9062e1298b020eae1212984e
> Author: Behdad Esfahbod <behdad at behdad.org>
> Date:   Sat Dec 27 23:13:45 2008 -0500
>
>    [spline] Add an analytical bounder for splines
>
>    The way this works is very simple:  Once for X, and once for Y, it
>    takes the derivative of the bezier equation, equals it to zero and
>    solves to find the extreme points, and if the extreme points are
>    interesting, adds them to the bounder.
>
>    Not the fastest algorithm out there, but my estimate is that if
>    _de_casteljau() ends up breaking a stroke in at least 10 pieces,
>    then the new bounder is faster.  Would be good to see some real
>    perf data.

Attached is the output of 'cairo-perf-diff ef0f6c^ ef0f6c' (only the
image backend) on Acer Aspire One. There's loads of fill tests that
are faster, but also few noticeable slowdowns.

-- 
Kalle Vahlman, zuh at iki.fi
Powered by http://movial.fi
Interesting stuff at http://sandbox.movial.com
See also http://syslog.movial.fi
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: analytical-cuve-bounds.perf.txt
Url: http://lists.cairographics.org/archives/cairo/attachments/20081229/40b17c02/attachment.txt 


More information about the cairo mailing list