Skip to content

pixops: Avoid division during alpha scaling

Jan Ziak requested to merge atomsymbol/gdk-pixbuf:master into master

This patch significantly improves performance of gtksourceview-2.10.5 full-screen redraw on a 4K display with an alpha channel.

Divisions by the common value 0xff0000 are converted into multiplications by an optimizing C compiler. For other values, 3 divisions are reduced to 1 division, 3 multiplications and some float-to-int conversions.

Merge request reports