draw: optimize Kernel.Transform.

benchmark                      old ns/op      new ns/op      delta
BenchmarkTformCRSrcGray        6111610        5344117        -12.56%
BenchmarkTformCRSrcNRGBA       62070281       59295178       -4.47%
BenchmarkTformCRSrcRGBA        13840290       10612547       -23.32%
BenchmarkTformCRSrcUniform     591637         587621         -0.68%
BenchmarkTformCRSrcYCbCr       72219184       69404747       -3.90%

As of current origin/master, Gray and RGBA have fast paths but the other src
image types do not. They have more fat, so the relative improvement is smaller.

Change-Id: Ibbae91cd3cb3c139efb1dcc8fda1cb6432505189
Reviewed-on: https://go-review.googlesource.com/7794
Reviewed-by: Rob Pike <r@golang.org>
2 files changed