mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +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 {
|
||||
i.img.ReplacePixels(i.pixels, nil)
|
||||
if !keepPendingPixels {
|
||||
i.pixels = nil
|
||||
}
|
||||
i.needsToResolvePixels = false
|
||||
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