Commit 851ded96 authored by Nigel Tao's avatar Nigel Tao

image: remove superfluous if condition.

DrawMask already returns early if r.Empty().

R=r
CC=golang-dev
https://golang.org/cl/4703041
parent caaa6764
...@@ -193,9 +193,6 @@ func drawFillOver(dst *image.RGBA, r image.Rectangle, src *image.ColorImage) { ...@@ -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) { func drawFillSrc(dst *image.RGBA, r image.Rectangle, src *image.ColorImage) {
if r.Dy() < 1 {
return
}
sr, sg, sb, sa := src.RGBA() sr, sg, sb, sa := src.RGBA()
// The built-in copy function is faster than a straightforward for loop to fill the destination with // 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 // the color, but copy requires a slice source. We therefore use a for loop to fill the first row, and
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment