internal/graphicscommand: refactoring

This commit is contained in:
Hajime Hoshi 2024-10-26 23:07:03 +09:00
parent 6fd9044bcf
commit 6cf235daef

View File

@ -18,6 +18,7 @@ import (
"fmt"
"image"
"math"
"slices"
"strings"
"github.com/hajimehoshi/ebiten/v2/internal/graphics"
@ -187,14 +188,9 @@ func (c *drawTrianglesCommand) CanMergeWithDrawTrianglesCommand(dst *Image, srcs
if c.shader != shader {
return false
}
if len(c.uniforms) != len(uniforms) {
if !slices.Equal(c.uniforms, uniforms) {
return false
}
for i := range c.uniforms {
if c.uniforms[i] != uniforms[i] {
return false
}
}
if c.dst != dst {
return false
}