]> Cypherpunks repositories - gostls13.git/commitdiff
image: remove superfluous if condition.
authorNigel Tao <nigeltao@golang.org>
Tue, 12 Jul 2011 07:02:55 +0000 (17:02 +1000)
committerNigel Tao <nigeltao@golang.org>
Tue, 12 Jul 2011 07:02:55 +0000 (17:02 +1000)
DrawMask already returns early if r.Empty().

R=r
CC=golang-dev
https://golang.org/cl/4703041

src/pkg/image/draw/draw.go

index 1583e6b888187a5e8afc1b23e438c1e80603d3c4..a748ff8c77ae59a5ecff3cbbc9d81f2ee43c6ca6 100644 (file)
@@ -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