[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master 686e2a5: Expand comment.
From: |
Werner Lemberg |
Subject: |
[freetype2] master 686e2a5: Expand comment. |
Date: |
Wed, 25 Aug 2021 19:18:48 -0400 (EDT) |
branch: master
commit 686e2a5eb38b00b6eda2070228e42b7101ee2ce1
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>
Expand comment.
---
src/smooth/ftgrays.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 8988e79..5ae7918 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master 686e2a5: Expand comment.,
Werner Lemberg <=