gsk: Fix luminance in Cairo and GL renderer
authorBenjamin Otte <otte@redhat.com>
Mon, 3 Jul 2023 18:45:53 +0000 (20:45 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 3 Jul 2023 20:02:44 +0000 (22:02 +0200)
commitc6eb7fd4837c34ab83de7c79c141404862b80810
tree0d826c3b8358bc0b986c81d86b4a4881a1149297
parent7c5837067318288efc15d9e753e9f3550cb7d7a2
gsk: Fix luminance in Cairo and GL renderer

In particular, fix the combination of luminance and alpha. We want to do
  mask = luminance * alpha
and for inverted
  mask = (1.0 - luminance) * alpha
so add a test that makes sure we do that and then fix the code and
existing tests to conform to it.
gsk/gl/resources/mask.glsl
gsk/gskrendernodeimpl.c
testsuite/gsk/compare/mask-modes-with-alpha.node [new file with mode: 0644]
testsuite/gsk/compare/mask-modes-with-alpha.png [new file with mode: 0644]
testsuite/gsk/compare/mask-modes.png
testsuite/gsk/meson.build