mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-27 03:02:49 +01:00
shareable: Refactoring
This commit is contained in:
parent
af0d6d7a48
commit
92e5bc31dc
@ -120,10 +120,6 @@ func (s *Image) Size() (width, height int) {
|
|||||||
func (s *Image) DrawImage(img *Image, sx0, sy0, sx1, sy1 int, geom *affine.GeoM, colorm *affine.ColorM, mode opengl.CompositeMode, filter graphics.Filter) {
|
func (s *Image) DrawImage(img *Image, sx0, sy0, sx1, sy1 int, geom *affine.GeoM, colorm *affine.ColorM, mode opengl.CompositeMode, filter graphics.Filter) {
|
||||||
backendsM.Lock()
|
backendsM.Lock()
|
||||||
defer backendsM.Unlock()
|
defer backendsM.Unlock()
|
||||||
s.drawImage(img, sx0, sy0, sx1, sy1, geom, colorm, mode, filter)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *Image) drawImage(img *Image, sx0, sy0, sx1, sy1 int, geom *affine.GeoM, colorm *affine.ColorM, mode opengl.CompositeMode, filter graphics.Filter) {
|
|
||||||
s.ensureNotShared()
|
s.ensureNotShared()
|
||||||
|
|
||||||
// Compare i and img after ensuring i is not shared, or
|
// Compare i and img after ensuring i is not shared, or
|
||||||
|
Loading…
Reference in New Issue
Block a user