[prev in list] [next in list] [prev in thread] [next in thread]
List: freetype-devel
Subject: [Devel] Re: FreeType performance issue
From: Werner LEMBERG <wl () gnu ! org>
Date: 2004-12-28 7:27:45
Message-ID: 20041228.082745.26533677.wl () gnu ! org
[Download RAW message or body]
> [...]
>
> In 'ftgrays.c ' file, the 'gray_convert_glyph' function calls
> 'gray_compute_cbox' function first to get an glyph boundary.
>
> *gray_compute_cbox function costs O(n) - n is the number of points
>
> But in this time, I think FreeType can use (raster->target).width,
> (raster->target).height. I think the code can be changed like this
>
> /*gray_compute_cbox( RAS_VAR );*/ // Don't need
> raster->min_ex = 0; // Added
> raster->max_ex = (raster->target).width; // Added
> raster->min_ey = 0; // Added
> raster->max_ey = (raster->target).height; // Added
> ...
>
> Would you tell me if there is any reason that I can't do like this?
I'm not an expert in optimizing C code for speed, but your change
looks promising. After the 2.1.10 release (which should happen soon)
I invite you to contribute changes which makes FreeType faster --
please provide a patch produced with the `diff' program, using the
`-u' switch, together with a ChangeLog entry.
Thanks in advance.
Werner
_______________________________________________
Devel mailing list
Devel@freetype.org
http://www.freetype.org/mailman/listinfo/devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic