backends/drm: Ensure that there's opengl context when painting cursor

This commit is contained in:
Vlad Zahorodnii 2022-05-12 15:32:35 +03:00 committed by Aleix Pol Gonzalez
parent 796e1cf5bf
commit fa0143fb97

View file

@ -427,6 +427,8 @@ void DrmOutput::renderCursorOpengl(const QSize &cursorSize)
m_cursorTextureDirty = false;
};
const auto [renderTarget, repaint] = layer->beginFrame();
if (!m_cursorTexture) {
allocateTexture();
@ -444,8 +446,6 @@ void DrmOutput::renderCursorOpengl(const QSize &cursorSize)
}
}
const auto [renderTarget, repaint] = layer->beginFrame();
QMatrix4x4 mvp;
mvp.ortho(QRect(QPoint(), renderTarget.size()));