I found this while I was looking for a fix to bug 184143. I've put a test case in https://people.igalia.com/magomez/opacity/index.html so the problem is visible: both columns show the images with opacity filters (opacity grows as we go down). The left column doesn't use GraphicsLayers for the images (and it produces the correct output), but the right column uses them and the result is wrong. There's a test for this css3/filters/effect-opacity-hw.html but we have a custom png result for GTK (which is wrong) and no png for WPE. There's also a txt result, but that's fine both for GTK and WPE. The GTK png must be updated when this is fixed. The problem is in the fragment shader, in how applyOpacityFilter() applies the opacity to the layer. It just applies it to the alpha channel, and not the colors. But we need the alpha to be premultiplied in order to perform a correct blending (check how applyOpacity() applies the value to the colors as well). If the colors are not premultiplied, then the alpha of the source texture is not taken into account (which means that a texture with 0 alpha will become visible when blending).
Created attachment 419131 [details] Patch
Committed r272361: <https://trac.webkit.org/changeset/272361> All reviewed patches have been landed. Closing bug and clearing flags on attachment 419131 [details].