mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 02:42:02 +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 {
|
if err := i.makeShared(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
delete(imagesToMakeShared, i)
|
||||||
}
|
}
|
||||||
delete(imagesToMakeShared, i)
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -382,6 +382,7 @@ func (i *Image) DrawTriangles(srcs [graphics.ShaderImageNum]*Image, vertices []f
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if !src.isShared() && src.shareable() {
|
if !src.isShared() && src.shareable() {
|
||||||
|
// src might already registered, but assiging it again is not harmful.
|
||||||
imagesToMakeShared[src] = struct{}{}
|
imagesToMakeShared[src] = struct{}{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user