918c063693
As first mentioned in commit 672171093, the CSS spec defines shadow colors independently from the colors casting the shadow. It's not a physical light simulation so a shadow is allowed to be a different color from texture casting it. This means we only care about the shape of the source where alpha values of zero are adjacent to alpha values of non-zero. And all such non-zero pixels should be treated as fully opaque for the purpose of shadow generation. While this would be wrong for a physical light simulation it does allow us to cast shadows around semi-translucent shapes and better support CSS. Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4477 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1918>