[Webkit-unassigned] [Bug 164001] Add support for wide gamut for ShareableBitmap for image popovers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 25 18:46:13 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=164001

--- Comment #3 from Tim Horton <thorton at apple.com> ---
Comment on attachment 292860
  --> https://bugs.webkit.org/attachment.cgi?id=292860
Patch

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

> Source/WebKit2/Shared/cg/ShareableBitmapCG.cpp:42
> +    if ((flags & ShareableBitmap::SupportsExtendedColor) && screenSupportsExtendedColor()) {

I'm not 100% sure we want this to depend on the screen. I believe images that bounce through ShareableBitmap can end up getting transmitted to other devices. Maybe we want callers to decide whether they set SupportsExtendedColor based on screenSupportsExtendedColor instead, since they will know whether there's a chance of it going elsewhere or not?

> Source/WebKit2/Shared/cg/ShareableBitmapCG.cpp:72
> +    RetainPtr<CGContextRef> bitmapContext = adoptCF(CGBitmapContextCreateWithData(data(), m_size.width(), m_size.height(), m_pixelSize << 1 /* multiply by 2 *8/4 = << 1 */, m_size.width() * m_pixelSize, colorSpace, bitmapInfo(m_flags), releaseBitmapContextData, this));

I think it's really OK to multiply by 2 instead of shifting here.

> Source/WebKit2/Shared/cg/ShareableBitmapCG.cpp:110
> +    // FIXME: Make this use extended color, etc.

I don't think this is optional? You're pointing at extended color data, won't that cause trouble if you make a non-extended-sRGB image from it? Or maybe it's OK because of the semicompatible nature of extended sRGB? What happens to out-of-range values?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161026/f9f2cad6/attachment.html>


More information about the webkit-unassigned mailing list