mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
internal/atlas: refactoring: remove unnecessary calculations
This commit is contained in:
parent
9e61b52a70
commit
d9a2b0922d
@ -583,9 +583,7 @@ func (i *Image) writePixels(pix []byte, x, y, width, height int) {
|
|||||||
copy(pixb[4*j*r.Dx():], pix[4*j*width:4*(j+1)*width])
|
copy(pixb[4*j*r.Dx():], pix[4*j*width:4*(j+1)*width])
|
||||||
}
|
}
|
||||||
|
|
||||||
x += r.Min.X
|
i.backend.restorable.WritePixels(pixb, r.Min.X, r.Min.Y, r.Dx(), r.Dy())
|
||||||
y += r.Min.Y
|
|
||||||
i.backend.restorable.WritePixels(pixb, x, y, r.Dx(), r.Dy())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *Image) ReadPixels(graphicsDriver graphicsdriver.Graphics, pixels []byte, x, y, width, height int) error {
|
func (i *Image) ReadPixels(graphicsDriver graphicsdriver.Graphics, pixels []byte, x, y, width, height int) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user