[cairo] Playing with spline decomposition
Carl Worth
cworth at cworth.org
Fri Oct 17 14:48:02 PDT 2008
On Fri, 2008-10-17 at 21:28 +0100, Chris Wilson wrote:
> This is just speculation based on the few percent in the profiles spent
> recomputing the convex hull at the beginning of each stroke and in
> performing the linear search. But having written the
> spline-decomposition test case, I can now see the importance of using
> the pen as opposed to simply using the offset curves.
Well the convex hull part I do want to just fix. Note that that's part
of "constructing" a pen, though, not "using" it.
I think the best route to get rid of the convex hull cost is Joonas'
approach to start using the pen for stroking all paths, (not just
curves). That would let us stop needing to insert the "extra points" for
properly aligned caps which means we could drop the need for computing a
convex hull just for those.
We would still need to ensure that when we create a pen in the first
place, (as an approximation of a circle), that we maintain convexity.
That should be much easier than a general convex hull implementation,
(since we're generating points that are sorted in some sense by
definition---so we can avoid the full sort that's the big expense in the
current convex hull implementation).
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.cairographics.org/archives/cairo/attachments/20081017/df5a3f0e/attachment.pgp
More information about the cairo
mailing list