Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1c5f54f324d1e0e3e15d9a7f75dc2911b0473e70
https://github.com/WebKit/WebKit/commit/1c5f54f324d1e0e3e15d9a7f75dc2911b0473e70
Author: Charlie Wolfe <[email protected]>
Date: 2026-09-10 (Thu, 10 Sep 2026)
Changed paths:
M Source/WebCore/platform/graphics/PixelBufferConversion.cpp
Log Message:
-----------
Add a fast path for premultiplying/unpremultiplying small pixel buffers
https://bugs.webkit.org/show_bug.cgi?id=323817
rdar://187057865
Reviewed by Gerald Squelart.
vImagePremultiplyData/vImageUnpremultiplyData pay a per-call setup and
multithreading overhead that
dominates for the small buffers canvas getImageData()/putImageData() hands them.
Add convertSmallImageAlpha(), a NEON implementation used on arm64 when the
pixel format is 8 bits
per component, the source and destination rows are tightly packed with a
matching stride, and the
buffer is at most 16384 pixels. The cap is approximate, chosen to keep the
working set in L1 on AS.
Anything that does not qualify keeps the existing vImage path.
I also considered passing the kvImageDoNotTile flag to vImage, which turns off
multithreading, but
performance A/B testing indicates the added function performs better.
~3-4% improvement on MotionMarkâs Canvas Lines, Design, Images, and Paths.
* Source/WebCore/platform/graphics/PixelBufferConversion.cpp:
(WebCore::convertSmallImageAlpha):
(WebCore::convertImagePixelsAcceleratedMatchingSize):
Canonical link: https://commits.webkit.org/320853@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications