internal/graphicscommand: remove unnecessary conditions

Now a Kage shader is always used.
This commit is contained in:
Hajime Hoshi 2022-10-02 22:11:06 +09:00
parent a9574627e8
commit 6fc9d9316d

View File

@ -402,19 +402,17 @@ func (c *drawTrianglesCommand) CanMergeWithDrawTrianglesCommand(dst *Image, srcs
if c.shader != shader { if c.shader != shader {
return false return false
} }
if c.shader != nil { if len(c.uniforms) != len(uniforms) {
if len(c.uniforms) != len(uniforms) { return false
}
for i := range c.uniforms {
if len(c.uniforms[i]) != len(uniforms[i]) {
return false return false
} }
for i := range c.uniforms { for j := range c.uniforms[i] {
if len(c.uniforms[i]) != len(uniforms[i]) { if c.uniforms[i][j] != uniforms[i][j] {
return false return false
} }
for j := range c.uniforms[i] {
if c.uniforms[i][j] != uniforms[i][j] {
return false
}
}
} }
} }
if c.dst != dst { if c.dst != dst {