aboutsummaryrefslogtreecommitdiff
path: root/src/bytes
diff options
context:
space:
mode:
authorNigel Tao <nigeltao@golang.org>2021-10-27 14:24:37 +1100
committerNigel Tao <nigeltao@golang.org>2021-10-31 08:29:02 +0000
commit8e3d5f0bb324eebb92cc93264a63afa7ded9ab9a (patch)
tree3a7c961d8817154ef9af60be59e55c9c02a465e9 /src/bytes
parent0bef30d28ac0b9654e5daef0fef731d7a9495214 (diff)
downloadgo-8e3d5f0bb324eebb92cc93264a63afa7ded9ab9a.tar.xz
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>
Diffstat (limited to 'src/bytes')
0 files changed, 0 insertions, 0 deletions