backends/drm: fix multi-gpu

The import code was added but not actually used
This commit is contained in:
Xaver Hugl 2022-02-26 23:53:52 +01:00
parent 36088cc82c
commit 6012e409a6

View file

@ -140,7 +140,14 @@ bool EglGbmLayer::endRendering(const QRegion &damagedRegion)
m_shadowBuffer->render(m_pipeline->pending.sourceTransformation);
}
GLRenderTarget::popRenderTarget();
const auto buffer = m_gbmSurface->swapBuffersForDrm(damagedRegion);
QSharedPointer<DrmBuffer> buffer;
if (m_pipeline->gpu() == m_eglBackend->gpu()) {
buffer = m_gbmSurface->swapBuffersForDrm(damagedRegion);
} else {
if (m_gbmSurface->swapBuffers(damagedRegion)) {
buffer = importBuffer();
}
}
if (buffer) {
m_currentBuffer = buffer;
m_currentDamage = damagedRegion;