Krita Behind blending mode glitch fix
The Behind blending mode has a problem (at least) in 16 bit integer
channel mode, probably because of mixing signed and unsigned integer
calculations. The blended color turns into its inverse at
near-transparent areas. This modified version works without this
problem.
Testplan:
Open a canvas with 16 bits integer channels and draw on a transparent
layer with some colors in the Behind drawing mode. It's best to use some
blurred tool like the airbrush. If you cross a different color stroke,
you can see inverse colors at the edges (Linux, x86_64).
Differential review:
https://phabricator.kde.org/D1023
CC:mneko@freemail.hu