Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType
Commits:
-
b6c11d49
by Alexei Podtelezhnikov at 2021-08-30T07:09:53-04:00
1 changed file:
Changes:
... | ... | @@ -386,12 +386,10 @@ typedef ptrdiff_t FT_PtrDist; |
386 | 386 |
/* divisors to provide sufficient accuracy of the multiply-shift. */
|
387 | 387 |
/* It should not exceed (64 - PIXEL_BITS) to prevent overflowing and */
|
388 | 388 |
/* leave enough room for 64-bit unsigned multiplication however. */
|
389 |
-#define FT_UDIVPREP( c, b ) \
|
|
390 |
- FT_Int64 b ## _r = c ? (FT_Int64)( ~(FT_UInt64)0 >> PIXEL_BITS ) / ( b ) \
|
|
391 |
- : 0
|
|
392 |
-#define FT_UDIV( a, b ) \
|
|
393 |
- (TCoord)( ( (FT_UInt64)( a ) * (FT_UInt64)( b ## _r ) ) >> \
|
|
394 |
- ( sizeof( FT_UInt64 ) * FT_CHAR_BIT - PIXEL_BITS ) )
|
|
389 |
+#define FT_UDIVPREP( c, b ) \
|
|
390 |
+ FT_Int64 b ## _r = c ? (FT_Int64)0xFFFFFFFF / ( b ) : 0
|
|
391 |
+#define FT_UDIV( a, b ) \
|
|
392 |
+ (TCoord)( ( (FT_UInt64)( a ) * (FT_UInt64)( b ## _r ) ) >> 32 )
|
|
395 | 393 |
|
396 | 394 |
|
397 | 395 |
/* Scale area and apply fill rule to calculate the coverage byte. */
|