WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
183774
[Cairo] Draw Cairo patterns with cairo_paint_with_alpha()
https://bugs.webkit.org/show_bug.cgi?id=183774
Summary
[Cairo] Draw Cairo patterns with cairo_paint_with_alpha()
Zan Dobersek
Reported
2018-03-20 05:26:22 PDT
[Cairo] Draw Cairo patterns with cairo_paint_with_alpha()
Attachments
Patch
(2.04 KB, patch)
2018-03-20 05:33 PDT
,
Zan Dobersek
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Zan Dobersek
Comment 1
2018-03-20 05:33:48 PDT
Created
attachment 336115
[details]
Patch
Zan Dobersek
Comment 2
2018-03-21 00:17:26 PDT
Comment on
attachment 336115
[details]
Patch Clearing flags on attachment: 336115 Committed
r229796
: <
https://trac.webkit.org/changeset/229796
>
Zan Dobersek
Comment 3
2018-03-21 00:17:30 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 4
2018-03-21 00:18:18 PDT
<
rdar://problem/38697417
>
Darin Adler
Comment 5
2018-03-29 09:25:04 PDT
Comment on
attachment 336115
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=336115&action=review
> Source/WebCore/platform/graphics/cairo/CairoOperations.cpp:155 > + cairo_paint_with_alpha(cr, std::max<float>(0, std::min<float>(1.0, alpha)));
Another way to write this with MathExtras.h is clampTo<float>(alpha, 0, 1).
Darin Adler
Comment 6
2018-03-29 09:25:55 PDT
Comment on
attachment 336115
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=336115&action=review
>> Source/WebCore/platform/graphics/cairo/CairoOperations.cpp:155 >> + cairo_paint_with_alpha(cr, std::max<float>(0, std::min<float>(1.0, alpha))); > > Another way to write this with MathExtras.h is clampTo<float>(alpha, 0, 1).
But I just realized that MathExtras does not have enough overloads for float, so maybe it’s better to write it the way you did, or write std::max(0.0f, std::min(1.0f, alpha)).
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