[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] rasterization without sorting
From: |
GRAHAM ASHER |
Subject: |
Re: [ft-devel] rasterization without sorting |
Date: |
Tue, 20 Jul 2010 00:57:24 -0700 (PDT) |
I think using #ifdefs is a good idea for the moment. Also, there are two
semi-obvious ways to make the optimisation even better, and I want to try to
implement them:
1. Pre-calculate the width of the array, to avoid calculating it in every call
to gray_record_cell.
2. (This is the big one). Use a variant of the TCell structure without x and y
fields, making it half the size; thus twice as many cells can be stored. X and
y
can be calculated from the array index inside the new version of gray_sweep.
Graham
----- Original Message ----
From: Werner LEMBERG <address@hidden>
To: address@hidden
Cc: address@hidden
Sent: Monday, 19 July, 2010 16:49:20
Subject: Re: [ft-devel] rasterization without sorting
> I have been working on a new way to optimise anti-aliased
> rasterization in FreeType and other similar libraries.
Great!
> I am not completely certain that this is the best way to do things
> for *glyph* rasterization, because glyphs are special cases, being
> in general relatively small, but it speeds up CartoType by about 7%,
> and I believe will speed up FreeType.
Given that David already tried to optimize the AA rasterization, an
improvement of 7% is really impressive.
> I enclose a patch file based on my current version of ftgrays.c,
> which I think is very slightly different from the official version.
> I also enclose ftgrays.c itself, for clarity. The differences are
> very simple and affect only this one file.
Thanks a lot! Will have a look the next days. What do you think
about embedding your changes into #ifdef's temporarily so that anxious
users could deactivate it if they are not in the mood of beta
testing? :-)
Werner