mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 10:42:42 +01:00
internal/graphicscommand: better log for read/write pixels
This commit is contained in:
parent
0e6702c043
commit
6eb0271f83
@ -221,7 +221,11 @@ type writePixelsCommandArgs struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *writePixelsCommand) String() string {
|
func (c *writePixelsCommand) String() string {
|
||||||
return fmt.Sprintf("write-pixels: dst: %d, len(args): %d", c.dst.id, len(c.args))
|
var args []string
|
||||||
|
for _, a := range c.args {
|
||||||
|
args = append(args, fmt.Sprintf("region: %s", a.region.String()))
|
||||||
|
}
|
||||||
|
return fmt.Sprintf("write-pixels: dst: %d, args: %s", c.dst.id, strings.Join(args, ", "))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exec executes the writePixelsCommand.
|
// Exec executes the writePixelsCommand.
|
||||||
@ -270,7 +274,11 @@ func (c *readPixelsCommand) NeedsSync() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *readPixelsCommand) String() string {
|
func (c *readPixelsCommand) String() string {
|
||||||
return fmt.Sprintf("read-pixels: image: %d", c.img.id)
|
var args []string
|
||||||
|
for _, a := range c.args {
|
||||||
|
args = append(args, fmt.Sprintf("region: %s", a.Region.String()))
|
||||||
|
}
|
||||||
|
return fmt.Sprintf("read-pixels: image: %d, args: %v", c.img.id, strings.Join(args, ", "))
|
||||||
}
|
}
|
||||||
|
|
||||||
// disposeImageCommand represents a command to dispose an image.
|
// disposeImageCommand represents a command to dispose an image.
|
||||||
|
Loading…
Reference in New Issue
Block a user