mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-03 06:24:27 +01:00
internal/atlas: refactoring: rename a variable
This commit is contained in:
parent
3c49f81b5c
commit
be68f50f96
@ -68,10 +68,10 @@ func putImagesOnSourceBackend(graphicsDriver graphicsdriver.Graphics) {
|
|||||||
// The counter usedAsDestinationCount is updated at most once per frame (#2676).
|
// The counter usedAsDestinationCount is updated at most once per frame (#2676).
|
||||||
for i := range imagesUsedAsDestination {
|
for i := range imagesUsedAsDestination {
|
||||||
// This counter is not updated when the backend is created in this frame.
|
// This counter is not updated when the backend is created in this frame.
|
||||||
if !i.backendJustCreated && i.usedAsDestinationCount < math.MaxInt {
|
if !i.backendCreatedInThisFrame && i.usedAsDestinationCount < math.MaxInt {
|
||||||
i.usedAsDestinationCount++
|
i.usedAsDestinationCount++
|
||||||
}
|
}
|
||||||
i.backendJustCreated = false
|
i.backendCreatedInThisFrame = false
|
||||||
delete(imagesUsedAsDestination, i)
|
delete(imagesUsedAsDestination, i)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,8 +164,8 @@ type Image struct {
|
|||||||
imageType ImageType
|
imageType ImageType
|
||||||
disposed bool
|
disposed bool
|
||||||
|
|
||||||
backend *backend
|
backend *backend
|
||||||
backendJustCreated bool
|
backendCreatedInThisFrame bool
|
||||||
|
|
||||||
node *packing.Node
|
node *packing.Node
|
||||||
|
|
||||||
@ -239,7 +239,7 @@ func (i *Image) ensureIsolatedFromSource(backends []*backend) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
i.allocate(bs, false)
|
i.allocate(bs, false)
|
||||||
i.backendJustCreated = true
|
i.backendCreatedInThisFrame = true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user