scene/workspacescene: don't check direct scanout candidates for a pixmap

We don't need a pixmap for direct scanout, and the drm backend destroys the pixmap
when direct scanout is successful... so this check created a loop of direct scanout
working and not working, and worse, the client reallocating its buffers each time.

BUG: 485639
BUG: 485730
BUG: 485712
CCBUG: 477016
This commit is contained in:
Xaver Hugl 2024-04-19 23:06:56 +02:00
parent 48197a4f5b
commit fba948b39f

View file

@ -164,17 +164,7 @@ static SurfaceItem *findTopMostSurface(SurfaceItem *item)
}
}
}
if (item->pixmap()) {
return item;
}
for (const auto &child : children | std::views::reverse) {
if (child->z() < 0) {
if (auto item = findTopMostSurface(static_cast<SurfaceItem *>(child))) {
return item;
}
}
}
return nullptr;
return item;
}
SurfaceItem *WorkspaceScene::scanoutCandidate() const