Bug 214259 - REGRESSION(r264280) [GTK][WPE] fast/gradients/conic-gradient-alpha.html is failing
Summary: REGRESSION(r264280) [GTK][WPE] fast/gradients/conic-gradient-alpha.html is fa...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-13 09:56 PDT by Lauro Moura
Modified: 2020-07-16 01:22 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.52 KB, patch)
2020-07-15 06:31 PDT, Carlos Garcia Campos
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lauro Moura 2020-07-13 09:56:07 PDT
Instead of the green conics, only grayscale ones.

History: https://results.webkit.org/?suite=layout-tests&test=fast%2Fgradients%2Fconic-gradient-alpha.html
Comment 1 Darin Adler 2020-07-13 10:32:26 PDT
Oops, looks like I broke this. Happy to help fix it.
Comment 2 Darin Adler 2020-07-13 13:24:01 PDT
Any indication what’s going wrong yet?
Comment 3 Carlos Alberto Lopez Perez 2020-07-13 18:00:22 PDT
It seems the generated gradient is now black&white: https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r264280%20(14625)/fast/gradients/conic-gradient-alpha-diffs.html
Comment 4 Darin Adler 2020-07-13 18:10:29 PDT
Maybe a bug in the blend function?
Comment 5 Carlos Garcia Campos 2020-07-15 06:27:41 PDT
There are two problems:

1. Now the blend is done using premultiplied alpha, since the first color stop is #00FF0000, the premultiplied is just 0, so we always end up with black color. So, just changing to use blendWithoutPremultiply() would fix the bug but...

2. There's a bug in blendWithoutPremultiply(), from is used in both fromSRGB and toSRGB.

Fixing 1 and 2 I get the right output, but the test doesn't pass yet, there's a one pixel difference for some reason.
Comment 6 Carlos Garcia Campos 2020-07-15 06:31:13 PDT
Created attachment 404338 [details]
Patch
Comment 7 Darin Adler 2020-07-15 09:48:17 PDT
Comment on attachment 404338 [details]
Patch

Nice! Thanks, this seems like a great fix.
Comment 8 Carlos Garcia Campos 2020-07-16 01:22:06 PDT
Committed r264449: <https://trac.webkit.org/changeset/264449>