[cairo] Patches for speeding up _cairo_fixed_from_double

Daniel Amelang daniel.amelang at gmail.com
Thu Nov 16 15:41:28 PST 2006


On 11/6/06, Carl Worth <cworth at cworth.org> wrote:
> On Mon, 6 Nov 2006 13:26:51 -0800, "Daniel Amelang" wrote:
> > > ...I'm going to be putting together a development snapshot
> > > with all the performance work that's been happening since the
> > > 1.2 branch...
> >
> > You might want to hold off on that development snapshot for a just
> > little longer. I have two more performance-related patches in the oven
> > that could potentially make a number of people happy.
>
> As a rule, we're going to try to break our bad habit of delaying
> development snapshots to try to get the next great feature in. I think
> we'll be a lot better off if we can release a new snapshot every week
> and each one faster than the one from the week before.
>
> > First, I'm fixing up this (orphaned?) patch:
> >
> > http://lists.freedesktop.org/archives/cairo/2006-September/007861.html
>
> Fantastic! That's another one that I've been hoping would get some more
> attention, as I obviously haven't been able to get around to do the
> cleanups I recommended myself.
>
> > to incorporate the feedback you gave. I addition, I have a little
> > tweak for it that produces an even greater speedup. This patch is very
> > important for the embedded guys, as it significantly reduces a common
> > and clearly-identified bottleneck. They won't be nearly as excited
> > about the upcoming development snapshot without it.
>
> Yes, eliminating the floating-point multiplies for the identity matrix
> will be very helpful. What's the additional tweak you have planned
> here?

_cairo_matrix_to_pixman_matrix can avoid all that conversion if the
cairo_matrix is an identity matrix, which is often the case. I saw
this happen quite a bit with text rendering on the image backend.

Nothing big, but a nice win using the same technique that the patch uses.

Dan


More information about the cairo mailing list