go/src/image
Nigel Tao 8e3d5f0bb3 image/draw: rename and reorder some benchmarks
The intention is for BenchmarkFooBar functions to map 1:1 to drawFooBar
functions. Recent draw.go changes have added more drawFooBar functions
and have further modified the mapping, as fallback drawFooBar functions
aren't invoked as often as they used to.

This commit restores the 1:1 mapping and reorganizes the BenchmarkFooBar
functions in the same order as the matching drawFooBar functions appear.

Also modify a TestDraw test case from vgradGreen(255) = {0, 136, 0, 255}
to vgradGreen(90) = {0, 48, 0, 90}. Doing so matches the existing "The
source pixel is {0, 48, 0, 90}" comment but also makes for a more
interesting test case, as the source pixel is no longer fully opaque.
Fully opaque is already covered by the vgradGray() test case on the next
line.

Also fix a "variable source" comment copy-pasto when the source image is
actually uniform, not variable.

Also add a func DrawMask type switch comment about interface types.

Change-Id: I828e71f2ee8ec617f523c8aafb118fb7ba166876
Reviewed-on: https://go-review.googlesource.com/c/go/+/358974
Trust: Nigel Tao <nigeltao@golang.org>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Nigel Tao <nigeltao@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2021-10-31 08:29:02 +00:00
..
color all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
draw image/draw: rename and reorder some benchmarks 2021-10-31 08:29:02 +00:00
gif image/gif: fix typo in the comment (io.ReadByte -> io.ByteReader) 2021-06-30 17:58:50 +00:00
internal/imageutil all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
jpeg image: resolve the TODO of doc comment style 2021-02-24 01:35:53 +00:00
png all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
testdata image/gif: fix transparency loss when encoding a wrapped *image.Paletted 2019-05-22 20:41:27 +00:00
decode_example_test.go
decode_test.go image: add missing error check in test 2019-05-23 15:51:48 +00:00
format.go
geom.go image: add Uniform.RGBA64At and Rectangle.RGBA64At 2021-06-30 02:00:49 +00:00
geom_test.go
image.go image: add RGBA64Image interface 2021-06-18 23:57:09 +00:00
image_test.go image: add Uniform.RGBA64At and Rectangle.RGBA64At 2021-06-30 02:00:49 +00:00
names.go image: add Uniform.RGBA64At and Rectangle.RGBA64At 2021-06-30 02:00:49 +00:00
ycbcr.go image: add RGBA64Image interface 2021-06-18 23:57:09 +00:00
ycbcr_test.go