mirror of
https://github.com/golang/go
synced 2024-11-19 11:14:47 -07:00
image: remove superfluous if condition.
DrawMask already returns early if r.Empty(). R=r CC=golang-dev https://golang.org/cl/4703041
This commit is contained in:
parent
caaa6764fa
commit
851ded9660
@ -193,9 +193,6 @@ func drawFillOver(dst *image.RGBA, r image.Rectangle, src *image.ColorImage) {
|
||||
}
|
||||
|
||||
func drawFillSrc(dst *image.RGBA, r image.Rectangle, src *image.ColorImage) {
|
||||
if r.Dy() < 1 {
|
||||
return
|
||||
}
|
||||
sr, sg, sb, sa := src.RGBA()
|
||||
// The built-in copy function is faster than a straightforward for loop to fill the destination with
|
||||
// the color, but copy requires a slice source. We therefore use a for loop to fill the first row, and
|
||||
|
Loading…
Reference in New Issue
Block a user