exp/draw: fast paths for drawing a YCbCr or an NRGBA onto an RGBA.
On my laptop, I had an 800x600 jpeg and an 800x600 png (with transparency). I timed how long it took to draw each image onto an equivalently sized, zeroed RGBA image. Previously, the jpeg took 75ms and the png took 70ms, going through the medium-fast path, i.e. func drawRGBA in draw.go. After this CL, the jpeg took 14ms, and the png took 21ms with the Over operator and 12ms with the Src operator. It's only a rough estimate basd on one image file, but it should give an idea of the order of magnitude of improvement. R=rsc, r CC=adg, golang-dev https://golang.org/cl/4468044
Showing
Please
register
or
sign in
to comment