mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
shareable: Refactoring
This commit is contained in:
parent
61a8f2c69c
commit
a3bccf5ff7
@ -79,8 +79,8 @@ func makeImagesShared() error {
|
||||
if err := i.makeShared(); err != nil {
|
||||
return err
|
||||
}
|
||||
delete(imagesToMakeShared, i)
|
||||
}
|
||||
delete(imagesToMakeShared, i)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -382,6 +382,7 @@ func (i *Image) DrawTriangles(srcs [graphics.ShaderImageNum]*Image, vertices []f
|
||||
continue
|
||||
}
|
||||
if !src.isShared() && src.shareable() {
|
||||
// src might already registered, but assiging it again is not harmful.
|
||||
imagesToMakeShared[src] = struct{}{}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user