backends/drm: reset cursor texture on compositing reset
When a GPU reset happens, the old texture and vbo become invalid
This commit is contained in:
parent
6211654e11
commit
3335716d7b
3 changed files with 11 additions and 0 deletions
|
@ -364,6 +364,11 @@ void DrmBackend::sceneInitialized()
|
|||
for (const auto &gpu : std::as_const(m_gpus)) {
|
||||
gpu->recreateSurfaces();
|
||||
}
|
||||
for (const auto &output : qAsConst(m_outputs)) {
|
||||
if (DrmOutput *drmOutput = qobject_cast<DrmOutput *>(output)) {
|
||||
drmOutput->resetCursorTexture();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -221,6 +221,11 @@ bool DrmOutput::moveCursor(const QPoint &position)
|
|||
return m_moveCursorSuccessful;
|
||||
}
|
||||
|
||||
void DrmOutput::resetCursorTexture()
|
||||
{
|
||||
m_cursor.texture.reset();
|
||||
}
|
||||
|
||||
QList<std::shared_ptr<OutputMode>> DrmOutput::getModes() const
|
||||
{
|
||||
const auto drmModes = m_pipeline->connector()->modes();
|
||||
|
|
|
@ -52,6 +52,7 @@ public:
|
|||
|
||||
bool setCursor(const QImage &image, const QPoint &hotspot) override;
|
||||
bool moveCursor(const QPoint &position) override;
|
||||
void resetCursorTexture();
|
||||
|
||||
DrmLease *lease() const;
|
||||
bool addLeaseObjects(QVector<uint32_t> &objectList);
|
||||
|
|
Loading…
Reference in a new issue