ebiten: Refactoring: Skip Concat when the argument is an identity

This commit is contained in:
Hajime Hoshi 2021-08-18 01:39:04 +09:00
parent a29748ab2b
commit 3dcb3d7ea7

View File

@ -66,7 +66,7 @@ func (c *ColorM) Apply(clr color.Color) color.Color {
func (c *ColorM) Concat(other ColorM) { func (c *ColorM) Concat(other ColorM) {
o := other.impl o := other.impl
if o == nil { if o == nil {
o = affine.ColorMIdentity{} return
} }
c.impl = c.affineColorM().Concat(o) c.impl = c.affineColorM().Concat(o)
} }