Re: Floating point in pango
- From: Behdad Esfahbod <behdad behdad org>
- To: Murray Cumming <murrayc murrayc com>
- Cc: performance-list gnome org
- Subject: Re: Floating point in pango
- Date: Wed, 12 Jul 2006 03:21:30 -0400
On Wed, 2006-07-12 at 08:47 +0200, Murray Cumming wrote:
> > Hi;
> >
> > On Tue, 2006-07-11 at 12:04 +0300, Jorn Baayen wrote:
> >> >
> >> > True. That's because cairo's public API uses floating point. Do you
> >> > have any idea how Pango can do better here?
> >>
> >> No :(
> >>
> >
> > Neither that nice but;
> >
> > - Have cairo expose a new alternate fixed point API that pango-cairo
> > makes use of ( openGL API does a similar thing ). Internally cairo
> > is mostly fixed point I believe.
>
> Is this something that we can do with just a typedef?
Not without a C++ compiler. But that may be feasible still. We use
floats like others do, add, multiply, sin(), cos(), and add & multiply
won't work straight on fixed.
> I don't think we should be afraid of adding an --enable-fixed-point=yes or
> --enable-embedded-api=yes build option so that the API is slightly
> different on some platforms. Backwards ABI compatibility isn't a big
> concern. Dependant software can then #ifdef where necessary to adapt its
> build to the alternative API.
Agreed. At some point I started making the 16.16 fixed split in cairo
configurable, but didn't finish the patch. That helps here too.
--
behdad
http://behdad.org/
"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
-- Dan Bern, "New American Language"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]