WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
215896
CSS invert() and opacity() filter implementations should use linear transfer functions for clarity and simplicity
https://bugs.webkit.org/show_bug.cgi?id=215896
Summary
CSS invert() and opacity() filter implementations should use linear transfer ...
frankhome61
Reported
2020-08-27 11:32:07 PDT
In WebKit's implementation of CSS filters invert() and opacity(), FEComponentTransfer is used and the transfer function is surprisingly to table, instead of linear. Looking at the CSS spec,
https://drafts.fxtf.org/filter-effects/#invertEquivalent
invert() and opacity() is implemented using "table" with just 2 values, which is equivalent to using a linear function. I propose to change the implementation of invert() and opacity() to use linear transfer function as well for simplicity and clarity.
Attachments
Patch
(4.02 KB, patch)
2020-08-27 11:45 PDT
,
frankhome61
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-08-27 11:32:37 PDT
<
rdar://problem/67887069
>
frankhome61
Comment 2
2020-08-27 11:45:35 PDT
Created
attachment 407421
[details]
Patch
Darin Adler
Comment 3
2020-08-27 17:50:28 PDT
Comment on
attachment 407421
[details]
Patch Does this have any effect on performance?
frankhome61
Comment 4
2020-08-27 18:06:35 PDT
(In reply to Darin Adler from
comment #3
)
> Comment on
attachment 407421
[details]
> Patch > > Does this have any effect on performance?
No, not that I know of. By looking at the code, FEComponentTransfer eventually converts linear, discrete table transfer functions to a hash map that maps each R,G,B values to a new value by applying the transfer function. So I don't expect this patch to cause any performance hit at all
EWS
Comment 5
2020-08-27 18:24:21 PDT
Committed
r266266
: <
https://trac.webkit.org/changeset/266266
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 407421
[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