mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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])
|
||||
}
|
||||
|
||||
x += r.Min.X
|
||||
y += r.Min.Y
|
||||
i.backend.restorable.WritePixels(pixb, x, y, r.Dx(), r.Dy())
|
||||
i.backend.restorable.WritePixels(pixb, r.Min.X, r.Min.Y, r.Dx(), r.Dy())
|
||||
}
|
||||
|
||||
func (i *Image) ReadPixels(graphicsDriver graphicsdriver.Graphics, pixels []byte, x, y, width, height int) error {
|
||||
|
Loading…
Reference in New Issue
Block a user