WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
221330
[WPE][GTK] Wrong rendering when using opacity filters on hw accelerated layers
https://bugs.webkit.org/show_bug.cgi?id=221330
Summary
[WPE][GTK] Wrong rendering when using opacity filters on hw accelerated layers
Miguel Gomez
Reported
2021-02-03 06:30:59 PST
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).
Attachments
Patch
(8.50 KB, patch)
2021-02-03 06:36 PST
,
Miguel Gomez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Miguel Gomez
Comment 1
2021-02-03 06:36:17 PST
Created
attachment 419131
[details]
Patch
EWS
Comment 2
2021-02-04 00:42:12 PST
Committed
r272361
: <
https://trac.webkit.org/changeset/272361
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 419131
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug