mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
internal/atlas: add comments
This commit is contained in:
parent
9ee56ac320
commit
5290605b2d
@ -656,6 +656,7 @@ func (i *Image) at(graphicsDriver graphicsdriver.Graphics, x, y int) (byte, byte
|
||||
// A function from finalizer must not be blocked, but disposing operation can be blocked.
|
||||
// Defer this operation until it becomes safe. (#913)
|
||||
func (i *Image) MarkDisposed() {
|
||||
// As MarkDisposed can be invoked from finalizers, backendsM should not be used.
|
||||
deferredM.Lock()
|
||||
deferred = append(deferred, func() {
|
||||
i.dispose(true)
|
||||
|
@ -42,6 +42,7 @@ func NewShader(ir *shaderir.Program) *Shader {
|
||||
// A function from finalizer must not be blocked, but disposing operation can be blocked.
|
||||
// Defer this operation until it becomes safe. (#913)
|
||||
func (s *Shader) MarkDisposed() {
|
||||
// As MarkDisposed can be invoked from finalizers, backendsM should not be used.
|
||||
deferredM.Lock()
|
||||
deferred = append(deferred, func() {
|
||||
s.dispose()
|
||||
|
Loading…
Reference in New Issue
Block a user