golang-image/draw
Nigel Tao 8e3389fa81 draw: have Scale and Transform recognize straight copies.
This is only for the NearestNeighbor and ApproxBiLinear Interpolators. A
Kernel interpolator will add blur even when the dst and src rectangles
are the same size.

We do not bother recognizing Transforms that are Scales. The performance
difference is minimal, as you still need to do a per-dst-pixel inverse
mapping either way.

benchmark                           old ns/op     new ns/op     delta
BenchmarkSimpleScaleCopy-8          4866297       29586         -99.39%
BenchmarkSimpleTransformCopy-8      4875991       29531         -99.39%
BenchmarkSimpleTransformScale-8     1208147       1223206       +1.25%

Change-Id: If649ad27a4e81bcbb24b18315745c02c9186a5b7
Reviewed-on: https://go-review.googlesource.com/13004
Reviewed-by: Rob Pike <r@golang.org>
2015-08-02 10:47:07 +00:00
..
draw.go draw: new package, a superset of the standard library's image/draw 2015-02-17 23:20:02 +00:00
example_test.go image/draw: have Transform take a f64.Aff3 instead of a *f64.Aff3. 2015-07-29 01:18:37 +00:00
gen.go draw: have Scale and Transform recognize straight copies. 2015-08-02 10:47:07 +00:00
impl.go draw: have Scale and Transform recognize straight copies. 2015-08-02 10:47:07 +00:00
scale_test.go draw: have Scale and Transform recognize straight copies. 2015-08-02 10:47:07 +00:00
scale.go image/draw: have Transform take a f64.Aff3 instead of a *f64.Aff3. 2015-07-29 01:18:37 +00:00
stdlib_test.go draw: skip TestFastPaths for Go 1.4. 2015-07-30 05:48:34 +00:00