internal/atlas: refactoring: remove (probably) unnecessary logics

This commit is contained in:
Hajime Hoshi 2023-08-19 04:36:34 +09:00
parent 1e2a4cb4b1
commit 32f1436576

View File

@ -279,10 +279,7 @@ func (i *Image) ensureIsolatedFromSource(backends []*backend) {
Height: h,
}
origBackend := i.backend
newI.drawTriangles([graphics.ShaderImageCount]*Image{i}, vs, is, graphicsdriver.BlendCopy, dr, graphicsdriver.Region{}, [graphics.ShaderImageCount - 1][2]float32{}, NearestFilterShader, nil, false, true)
delete(theSourceBackendsForOneFrame, origBackend)
newI.moveTo(i)
}
@ -600,8 +597,6 @@ func (i *Image) dispose(markDisposed bool) {
i.backend.restorable.Dispose()
delete(theSourceBackendsForOneFrame, i.backend)
for idx, sh := range theBackends {
if sh == i.backend {
theBackends = append(theBackends[:idx], theBackends[idx+1:]...)