FreeType Speeds-Up ClearType-Like LCD Filter Rendering By 40%
([Free Software] 37 Minutes Ago
FreeType Optimization)
- Reference: 0001609192
- News link: https://www.phoronix.com/news/FreeType-Faster-ClearType-Like
- Source link:
The widely-used FreeType library used for rendering text onto bitmaps has landed a significant optimization for its LCD filtering code path for Microsoft ClearType-like rendering. Thanks to the improvement, the rendering can be around 40% faster.
Rather than blanket LCD filtering over the entire bitmap, the latest FreeeType code now applies the filtering only to non-zero spans using direct rendering. The commit notes that for this ClearType-like rendering it's more than 40% faster at sizes above 32 ppem.
Alexei Podtelezhnikov commented in [1]the commit merged to FreeType Git yesterday:
"Applying an LCD filter to spans rather than the entire image improves the performance of ClearType-like rendering by about 40% at 32 ppem and much more at larger sizes. Small rounding differences are expected."
Quite a nice improvement and a bit surprising such an optimization wasn't implemented previously for this widely-used open-source library.
[1] https://gitlab.freedesktop.org/freetype/freetype/-/commit/7cc8f37b9a735e5d6e02fb54282af1b596002aa6
Rather than blanket LCD filtering over the entire bitmap, the latest FreeeType code now applies the filtering only to non-zero spans using direct rendering. The commit notes that for this ClearType-like rendering it's more than 40% faster at sizes above 32 ppem.
Alexei Podtelezhnikov commented in [1]the commit merged to FreeType Git yesterday:
"Applying an LCD filter to spans rather than the entire image improves the performance of ClearType-like rendering by about 40% at 32 ppem and much more at larger sizes. Small rounding differences are expected."
Quite a nice improvement and a bit surprising such an optimization wasn't implemented previously for this widely-used open-source library.
[1] https://gitlab.freedesktop.org/freetype/freetype/-/commit/7cc8f37b9a735e5d6e02fb54282af1b596002aa6