[webkit-reviews] review granted: [Bug 212059] Remove almost always incorrect Color::getRGBA : [Attachment 399772] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 19 15:00:42 PDT 2020


Darin Adler <darin at apple.com> has granted Sam Weinig <sam at webkit.org>'s request
for review:
Bug 212059: Remove almost always incorrect Color::getRGBA
https://bugs.webkit.org/show_bug.cgi?id=212059

Attachment 399772: Patch

https://bugs.webkit.org/attachment.cgi?id=399772&action=review




--- Comment #15 from Darin Adler <darin at apple.com> ---
Comment on attachment 399772
  --> https://bugs.webkit.org/attachment.cgi?id=399772
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=399772&action=review

> Source/WebCore/platform/graphics/Color.cpp:393
> +    float largestNonAlphaChannel = std::max(r, std::max(g, b));

I think we could write: std::max({ r, g, b })

> Source/WebCore/platform/graphics/Color.h:97
> +RGBA32 colorWithOverrideAlpha(RGBA32 color, int overrideAlpha);

I’d think we’d want this to be uint8_t, not int.


More information about the webkit-reviews mailing list