]> Cypherpunks.ru repositories - gostls13.git/commit
image/draw: add RGBA64Image fast path for RGBA dst
authorNigel Tao <nigeltao@golang.org>
Fri, 24 Sep 2021 00:43:55 +0000 (10:43 +1000)
committerNigel Tao <nigeltao@golang.org>
Mon, 27 Sep 2021 10:10:16 +0000 (10:10 +0000)
commitdac89a9d7fb253d30e5161e9ff6d80fbdfc79d75
tree17cce06296d80bc4aa0d986c1a8b2002226ab040
parent54079dfd7fff6c61d41c4832c074e8231f235fc3
image/draw: add RGBA64Image fast path for RGBA dst

This should have been part of https://golang.org/cl/340049 but I
overlooked it. That commit added fast path code when the destination
image was *not* an *image.RGBA. This commit edits func drawRGBA.

name               old time/op  new time/op  delta
RGBA1-4            5.11ms ± 1%  1.12ms ± 1%  -78.01%  (p=0.008 n=5+5)
RGBA2-4            8.69ms ± 1%  2.98ms ± 1%  -65.77%  (p=0.008 n=5+5)

Updates #44808.
Updates #46395.

Change-Id: I899d46d985634fc81ea47ff4f0d436630e8a961c
Reviewed-on: https://go-review.googlesource.com/c/go/+/351852
Trust: Nigel Tao <nigeltao@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
src/image/draw/bench_test.go
src/image/draw/draw.go
src/image/draw/draw_test.go