WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 234492
Add support for premultiplied alpha interpolated gradients and defaulted off option to use them for CSS Gradients
https://bugs.webkit.org/show_bug.cgi?id=234492
Summary
Add support for premultiplied alpha interpolated gradients and defaulted off ...
Sam Weinig
Reported
2021-12-19 13:14:34 PST
Add CGShadingRef based implementation of Gradient as stepping stone toward premultiplied interpolation
Attachments
For the bots
(19.09 KB, patch)
2021-12-19 13:20 PST
,
Sam Weinig
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(18.11 KB, patch)
2021-12-19 13:55 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(17.15 KB, patch)
2021-12-19 15:38 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(17.74 KB, patch)
2021-12-19 17:48 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(36.76 KB, patch)
2021-12-19 17:48 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(37.93 KB, patch)
2021-12-19 18:10 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(47.81 KB, patch)
2021-12-19 20:59 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(47.68 KB, patch)
2021-12-19 21:00 PST
,
Sam Weinig
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(58.34 KB, patch)
2021-12-19 21:55 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(68.78 KB, patch)
2021-12-20 11:31 PST
,
Sam Weinig
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(84.54 KB, patch)
2021-12-20 15:16 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(89.33 KB, patch)
2021-12-20 17:16 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(90.00 KB, patch)
2021-12-20 21:24 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(90.94 KB, patch)
2021-12-20 21:29 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Show Obsolete
(13)
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2021-12-19 13:20:22 PST
Comment hidden (obsolete)
Created
attachment 447558
[details]
For the bots
Sam Weinig
Comment 2
2021-12-19 13:55:40 PST
Comment hidden (obsolete)
Created
attachment 447559
[details]
Patch
Sam Weinig
Comment 3
2021-12-19 15:38:43 PST
Comment hidden (obsolete)
Created
attachment 447565
[details]
Patch
Sam Weinig
Comment 4
2021-12-19 17:48:16 PST
Comment hidden (obsolete)
Created
attachment 447567
[details]
Patch
Sam Weinig
Comment 5
2021-12-19 17:48:42 PST
Comment hidden (obsolete)
Created
attachment 447568
[details]
Patch
Sam Weinig
Comment 6
2021-12-19 18:10:46 PST
Comment hidden (obsolete)
Created
attachment 447569
[details]
Patch
Sam Weinig
Comment 7
2021-12-19 20:59:10 PST
Comment hidden (obsolete)
Created
attachment 447579
[details]
Patch
Sam Weinig
Comment 8
2021-12-19 21:00:06 PST
Comment hidden (obsolete)
Created
attachment 447580
[details]
Patch
Sam Weinig
Comment 9
2021-12-19 21:55:27 PST
Comment hidden (obsolete)
Created
attachment 447582
[details]
Patch
Sam Weinig
Comment 10
2021-12-20 11:31:20 PST
Comment hidden (obsolete)
Created
attachment 447614
[details]
Patch
Sam Weinig
Comment 11
2021-12-20 15:16:10 PST
Created
attachment 447654
[details]
Patch
Sam Weinig
Comment 12
2021-12-20 15:17:09 PST
Comment on
attachment 447654
[details]
Patch Still need to figure out what to do about the GTK port, since it doesn't look like Cairo has premultiplied alpha support, but this is good to review now.
Simon Fraser (smfr)
Comment 13
2021-12-20 15:32:17 PST
Comment on
attachment 447654
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=447654&action=review
> Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml:287 > +CSSGradientAlphaPremultipliedInterpolationEnabled:
287CSSGradientAlphaPremultipliedInterpolationEnabled -> 287CSSGradientPremultipliedAlphaInterpolationEnabled ?
> Source/WebCore/platform/graphics/cg/GradientCGStrategy.h:82 > + using Strategy = std::variant<Gradient, Shading>;
I don't like the naming here. To me, a "strategy" sounds like an enum value describing which implementation to use. I was confused that pickStrategy(), makeGradient() and makeShading() all return something called a "Strategy". std::variant<Gradient, Shading> is more like "GradientRenderer" or something.
Sam Weinig
Comment 14
2021-12-20 17:16:57 PST
Created
attachment 447668
[details]
Patch
Sam Weinig
Comment 15
2021-12-20 21:24:02 PST
Created
attachment 447685
[details]
Patch
Sam Weinig
Comment 16
2021-12-20 21:29:44 PST
Created
attachment 447686
[details]
Patch
EWS
Comment 17
2021-12-21 04:43:34 PST
Committed
r287310
(
245462@main
): <
https://commits.webkit.org/245462@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 447686
[details]
.
Radar WebKit Bug Importer
Comment 18
2021-12-21 04:44:18 PST
<
rdar://problem/86764026
>
mitz
Comment 19
2021-12-21 06:53:42 PST
Comment on
attachment 447686
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=447686&action=review
> Source/WebCore/platform/graphics/cg/GradientRendererCG.cpp:53 > + // FIXME: Use gradient strategy if none of the stops have alpha.
For performance, it may be useful to do this also whenever the only stops with non-1 alpha have 0 alpha, by adjusting and, if necessary, repeating the transparent stop. There are likely other cases (likely the most common cases) that can be optimized this way.
Fujii Hironori
Comment 20
2021-12-21 13:43:40 PST
***
Bug 150940
has been marked as a duplicate of this bug. ***
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