Expand comment.

This commit is contained in:
Alexei Podtelezhnikov 2021-08-25 23:18:43 +00:00
parent f7f9cb0dde
commit 686e2a5eb3
1 changed files with 7 additions and 2 deletions

View File

@ -373,8 +373,13 @@ typedef ptrdiff_t FT_PtrDist;
#endif /* __arm__ */
/* These macros speed up repetitive divisions by replacing them */
/* with multiplications and right shifts. */
/* Calculating coverages for a slanted line requires a division each */
/* time the line crosses from cell to cell. These macros speed up */
/* the repetitive divisions by replacing them with multiplications */
/* and right shifts so that at most two divisions are performed for */
/* each slanted line. Nevertheless, these divisions are noticeable */
/* in the overall performance because flattened curves produce a */
/* very large number of slanted lines. */
#define FT_UDIVPREP( c, b ) \
FT_Int64 b ## _r = c ? (FT_Int64)( ~(FT_UInt64)0 >> PIXEL_BITS ) / ( b ) \
: 0