mirror of https://github.com/freetype/freetype
* src/base/ftlcdfil.c (FT_SHIFTCLAMP): Cancel clamping.
Without clamping, we might get garbage output for unnormalized weights. So what? Garbage in, garbage out - but filtering becomes noticeably faster.
This commit is contained in:
parent
aca4ec5907
commit
6e4012550c
|
@ -28,7 +28,12 @@
|
|||
/* define USE_LEGACY to implement the legacy filter */
|
||||
#define USE_LEGACY
|
||||
|
||||
#if 1
|
||||
#define FT_SHIFTCLAMP( x ) (FT_Byte)( x >> 8 )
|
||||
#else
|
||||
#define FT_SHIFTCLAMP( x ) ( x >>= 8, (FT_Byte)( x > 255 ? 255 : x ) )
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* add padding according to filter weights */
|
||||
|
|
Loading…
Reference in New Issue