Skip to content

Commit

Permalink
internal/graphicscommand: refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Oct 26, 2024
1 parent 6fd9044 commit 6cf235d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions internal/graphicscommand/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"fmt"
"image"
"math"
"slices"
"strings"

"github.com/hajimehoshi/ebiten/v2/internal/graphics"
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 6cf235d

Please sign in to comment.