Re: Floating point in pango
- From: Jorn Baayen <jorn openedhand com>
- To: Carl Worth <cworth cworth org>
- Cc: performance-list gnome org, Behdad Esfahbod <behdad behdad org>
- Subject: Re: Floating point in pango
- Date: Fri, 21 Jul 2006 16:34:44 +0200
On Thu, 2006-07-20 at 11:41 -0700, Carl Worth wrote:
> > Id be interested your thoughts on optimising FP to perform when you dont
> > have an FPU. Maybe the amount of FP calls in pango-cairo could simply be
> > heavily reduced ?
> Sure. If switching from floating-point to fixed-point within
> pango-cairo is a win, then please do that.
The only floating-point usage within pango-cairo that could be made to
use fixed-point is glyph coordinate calculation. This however is
responsible for only 1% of the pango-cairo profile, and the advantage
would probably be drowned out by the then necessary additional
 See "pango_cairo_renderer_draw_glyphs [self]" in
> > If Cairo cares about performing well on embedded type hardware ( maybe
> > it doesn't? ), use of fixed point seems pretty much mandatory on lower
> > end hardware - For example OpenGL ES, Playstation and Nintendo Handheld
> > graphics API's all use it.
> It is important to me for cairo to perform well on embedded hardware,
> but I'm not yet ready to sacrifice ease-of-use in the API in an effort
> to get this performance, (particularly when we don't yet know if that
> sacrifice is necessary).
> Here's my recommendation: Imagine that we added a fixed-point API to
> cairo today. Then, do the work necessary in pango, (or other
> important layers), to take advantage of that API. Also, do the work
> within cairo to operate on fixed-point values wherever possible.
> Once that work is done, all that should be left is a pair of
> conversions fixed->floating->fixed right at the cairo API. And at that
> point, if the overhead from that conversion is a performance problem
> then I will be happy to add new API for this. (And obviously, cairo
> would be using a faster approach for conversion than what it's using
> That plan should involve no extra work, but has the huge benefit of
> not sacrificing the design of the API until we've proven that that is
> necessary in order to get the performance we want.
> Does that make sense?
I'm not quite sure what you are suggesting. Are you suggesting to add a
fixed-point API to cairo, or not?
> Performance-list mailing list
> Performance-list gnome org
] [Thread Prev