[webkit-reviews] review granted: [Bug 183438] Implement createImageBitmap(ImageData) : [Attachment 406103] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 6 13:09:29 PDT 2020


Dean Jackson <dino at apple.com> has granted Kenneth Russell <kbr at google.com>'s
request for review:
Bug 183438: Implement createImageBitmap(ImageData)
https://bugs.webkit.org/show_bug.cgi?id=183438

Attachment 406103: Patch

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




--- Comment #4 from Dean Jackson <dino at apple.com> ---
Comment on attachment 406103
  --> https://bugs.webkit.org/attachment.cgi?id=406103
Patch

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

> Source/WebCore/platform/graphics/ImageBufferBackend.cpp:191
> +    if (srcColorFormat == destColorFormat) {
> +	   reinterpret_cast<uint32_t*>(destPixel)[0] = reinterpret_cast<const
uint32_t*>(srcPixel)[0];
> +	   return;
> +    }
> +
> +    // Swap pixel channels BGRA <-> RGBA.
> +    destPixel[0] = srcPixel[2];
> +    destPixel[1] = srcPixel[1];
> +    destPixel[2] = srcPixel[0];
> +    destPixel[3] = srcPixel[3];

Could you put a FIXME in here mentioning that we could maybe use
Accelerate.framework on large Buffers to do this premultiply + swizzle step
faster?


More information about the webkit-reviews mailing list