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