No need to reset the damage for objects that we already know have none

This commit is contained in:
Aleix Pol 2021-05-20 13:58:30 +02:00 committed by Aleix Pol Gonzalez
parent 848e9e2076
commit 22f2e3e43c

View file

@ -1285,8 +1285,8 @@ static bool bindSurfaceTexture(SurfaceItem *surfaceItem)
const QRegion region = surfaceItem->damage();
if (!region.isEmpty()) {
platformSurfaceTexture->update(region);
surfaceItem->resetDamage();
}
surfaceItem->resetDamage();
return true;
}
if (!surfacePixmap->isValid()) {