mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 10:42:42 +01:00
restorable: Don't call (*graphicscommand.Image).Pixels twice
This commit is contained in:
parent
3952474690
commit
3faa674e32
@ -416,9 +416,10 @@ func (i *Image) makeStaleIfDependingOn(target *Image) {
|
||||
|
||||
// readPixelsFromGPU reads the pixels from GPU and resolves the image's 'stale' state.
|
||||
func (i *Image) readPixelsFromGPU() {
|
||||
pix := i.image.Pixels()
|
||||
i.basePixels = &Pixels{
|
||||
pixels: i.image.Pixels(),
|
||||
length: len(i.image.Pixels()),
|
||||
pixels: pix,
|
||||
length: len(pix),
|
||||
}
|
||||
i.drawImageHistory = nil
|
||||
i.stale = false
|
||||
|
Loading…
Reference in New Issue
Block a user