Revert "internal/atlas: clarify the logic when to update usedAsDestination"

This reverts commit 2c9f5d9dad.

Reason: test failures
This commit is contained in:
Hajime Hoshi 2023-08-06 15:25:55 +09:00
parent 2c9f5d9dad
commit dcc8794883

View File

@ -230,7 +230,6 @@ func (i *Image) paddingSize() int {
func (i *Image) ensureIsolatedFromSource(backends []*backend) { func (i *Image) ensureIsolatedFromSource(backends []*backend) {
i.resetUsedAsSourceCount() i.resetUsedAsSourceCount()
imagesUsedAsDestination[i] = struct{}{}
if i.backend == nil { if i.backend == nil {
// `theSourceBackendsForOneFrame` already includes `backends`. // `theSourceBackendsForOneFrame` already includes `backends`.
@ -246,6 +245,8 @@ func (i *Image) ensureIsolatedFromSource(backends []*backend) {
return return
} }
imagesUsedAsDestination[i] = struct{}{}
// Check if i has the same backend as the given backends. // Check if i has the same backend as the given backends.
var needsIsolation bool var needsIsolation bool
for _, b := range backends { for _, b := range backends {