Skip the multiplications if the alpha channel is 0 to speed up cases
where the image is mostly fully transparent. perf showed this function
to be a hotspot when compositing a mostly transparent image onto a video
at 4K resolution.
Timings in ms with a (best-case) fully transparent 3840x2160 image:
Skip the multiplications if the alpha channel is 0 to speed up cases where the image is mostly fully transparent. perf showed this function to be a hotspot when compositing a mostly transparent image onto a video at 4K resolution.
Timings in ms with a (best-case) fully transparent 3840x2160 image:
-02 8.7 5.1 -03 8.7 4.1