]> Cypherpunks repositories - gostls13.git/commit
image/draw: fix double-draw when the dst is paletted.
authorNigel Tao <nigeltao@golang.org>
Fri, 3 Jul 2015 01:34:18 +0000 (11:34 +1000)
committerNigel Tao <nigeltao@golang.org>
Fri, 3 Jul 2015 03:08:40 +0000 (03:08 +0000)
commit40a1516a098b9843e2d3e5ee2b9471a57d6f2470
tree50bb4f3fcb357825bb9e290aed8087c9872ab3a8
parent09b5463d9bcdd7b9562838e0b44029b6c04c487d
image/draw: fix double-draw when the dst is paletted.

The second (fallback) draw is a no-op, but it's a non-trivial amount of work.

Fixes #11550.

benchmark               old ns/op     new ns/op     delta
BenchmarkPaletted-4     16301219      7309568       -55.16%

Change-Id: Ic88c537b2b0c710cf517888f3dd15cb702dd142f
Reviewed-on: https://go-review.googlesource.com/11858
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/image/draw/bench_test.go
src/image/draw/draw.go