mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
internal/buffered: refactoring
This commit is contained in:
parent
b3f4d6c522
commit
fbcbd2a001
@ -116,13 +116,15 @@ func (i *Image) invalidatePendingPixels() {
|
||||
}
|
||||
|
||||
func (i *Image) resolvePendingPixels(keepPendingPixels bool) {
|
||||
if i.needsToResolvePixels {
|
||||
if !i.needsToResolvePixels {
|
||||
return
|
||||
}
|
||||
|
||||
i.img.ReplacePixels(i.pixels, nil)
|
||||
if !keepPendingPixels {
|
||||
i.pixels = nil
|
||||
}
|
||||
i.needsToResolvePixels = false
|
||||
}
|
||||
}
|
||||
|
||||
func (i *Image) MarkDisposed() {
|
||||
|
Loading…
Reference in New Issue
Block a user