internal/graphicscommand: refactoring

This commit is contained in:
Hajime Hoshi 2022-11-12 22:26:28 +09:00
parent a406904a51
commit 4ff9a12930

View File

@ -368,10 +368,10 @@ func (c *drawTrianglesCommand) CanMergeWithDrawTrianglesCommand(dst *Image, srcs
if c.blend != blend {
return false
}
if c.evenOdd || evenOdd {
if c.evenOdd && evenOdd {
return !mightOverlapDstRegions(c.vertices, vertices)
}
if c.evenOdd != evenOdd {
return false
}
if c.evenOdd && mightOverlapDstRegions(c.vertices, vertices) {
return false
}
return true