[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] defects in ftgrays.c
From: |
David Turner |
Subject: |
Re: [Devel] defects in ftgrays.c |
Date: |
Fri, 28 Sep 2001 09:24:23 +0200 |
Hi Graham,
Graham Asher a écrit :
>
> While adapting the routines in ftgrays.c I have noticed a few defects.
> These affect efficiency, not correctness, but are probably worth fixing.
>
Thanks for spotting these inefficiencies in the rasterizer, I'll commit
fixes as soon as the server switch is complete (as well as the PS Hinter
by the way)
> 1. compute_cbox takes an unnecessary argument specifying the outline. The
> outline is already available as a member of TRaster (ras.outline).
>
True.
> 2. The local static version of FT_Outline_Decompose uses variables 'shift'
> and 'delta' which are always zero. These variables can be removed. The
> macro SCALED (defined as '#define SCALED( x ) ( ( (x) << shift ) - delta
> )') thus becomes unnecessary and can be removed completely.
>
That's also true. I'll probably redefine the macro to something like
#define SCALED(x) x
simply because this might be useful for future experimentation..
> 3. The function Move_To calls record_cell, which can fail, but ignores its
> return value.
>
> 4. start_cell calls set_cell but ignores its return value, which is an
> error code; start_cell should itself return an error value.
>
True too. Actually, I have made a patch to the rasterizer to force it
to use setjmp/longjmp to deal with raster pool overflows. This simplifies
the design and gets rids of these bugs altogether (seems that it also
speeds rendering speed by 5% !!)
Regards,
- David