op/paint: remove unnecessary check in ImageOp

Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
This commit is contained in:
Pierre Curto
2021-11-10 15:49:14 +01:00
committed by Elias Naur
parent 9835cd5996
commit bcf3ff77ff
5 changed files with 33 additions and 8 deletions
+3 -6
View File
@@ -59,12 +59,9 @@ func NewImageOp(src image.Image) ImageOp {
color: col,
}
case *image.RGBA:
bounds := src.Bounds()
if bounds.Min == (image.Point{}) && src.Stride == bounds.Dx()*4 {
return ImageOp{
src: src,
handle: new(int),
}
return ImageOp{
src: src,
handle: new(int),
}
}