1
0
mirror of https://github.com/golang/go synced 2024-11-17 00:24:48 -07:00
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
internal/imageutil all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
jpeg
png all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
testdata
decode_example_test.go
decode_test.go
format.go
geom_test.go
geom.go
image_test.go
image.go
names.go
ycbcr_test.go
ycbcr.go