From 851ded9660d0fbf688a9db2472e82c6fea72bb2f Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Tue, 12 Jul 2011 17:02:55 +1000 Subject: [PATCH] image: remove superfluous if condition. DrawMask already returns early if r.Empty(). R=r CC=golang-dev https://golang.org/cl/4703041 --- src/pkg/image/draw/draw.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/pkg/image/draw/draw.go b/src/pkg/image/draw/draw.go index 1583e6b888..a748ff8c77 100644 --- a/src/pkg/image/draw/draw.go +++ b/src/pkg/image/draw/draw.go @@ -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