[Webkit-unassigned] [Bug 221330] New: [WPE][GTK] Wrong rendering when using opacity filters on hw accelerated layers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 3 06:30:59 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=221330

            Bug ID: 221330
           Summary: [WPE][GTK] Wrong rendering when using opacity filters
                    on hw accelerated layers
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKitGTK
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: magomez at igalia.com
                CC: bugs-noreply at webkitgtk.org

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).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210203/96ce08a5/attachment-0001.htm>


More information about the webkit-unassigned mailing list