[cairo] Cairo 1.3 performance loss
Behdad Esfahbod
behdad at behdad.org
Tue Jan 30 15:00:13 PST 2007
On Tue, 2007-01-30 at 17:02 -0500, Daniel Amelang wrote:
> On 1/30/07, Jorn Baayen <jorn at openedhand.com> wrote:
> > 1.3.8 sees a 1.15x text drawing speedup wrt 1.3.6 (which performs about
> > the same as 1.2.4) -- probably due to Behdad's show_glyphs rework. With
> > 1.3.10 text drawing sees a 0.89x slowdown. I'll trace down what exactly
> > causes this (hopefully) tomorrow.
>
> One thing comes to mind: Behdad fixed a bug in 1.3.10 (I think) that
> added an extra check before enabling a show_glyphs optimization (in
> cairo-gstate somewhere). It is possible that the 1.3.6 was faster
> because it used this optimization where it really shouldn't have.
I believe you mean this:
@@ -1588,7 +1588,8 @@ _cairo_gstate_transform_glyphs_to_backend (cairo_gstate_t *gstate,
cairo_matrix_t *device_transform = &gstate->target->device_transform;
if (_cairo_matrix_is_identity (ctm) &&
- _cairo_matrix_is_identity (device_transform))
+ _cairo_matrix_is_identity (device_transform) &&
+ gstate->font_matrix.x0 == 0 && gstate->font_matrix.y0 == 0)
{
memcpy (transformed_glyphs, glyphs, num_glyphs * sizeof (cairo_glyph_t));
}
This shouldn't have any impact in typical uses, as font matrices with
non-zero translation are not used in Pango at all.
The only other change between 1.3.8 and 1.3.10 I see that *may* have any
impact is Carl's optimization for rectilinear strokes, but I really
doubt that's what you're looking for.
Can you retest?
> Sorry for not providing specifics. I have to take off right now. I can
> get you more later if you need it.
>
> Dan
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo
--
behdad
http://behdad.org/
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
More information about the cairo
mailing list