wayland: Log an entry when an unsupported buffer was submitted
It's fine to be conservative about what kind of buffers we support, but failing silently only makes it hard on such cases. Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
This commit is contained in:
parent
70231f2431
commit
68d1e2f42a
2 changed files with 4 additions and 0 deletions
|
@ -41,6 +41,7 @@ bool BasicEGLSurfaceTextureWayland::create()
|
|||
} else if (m_pixmap->buffer()->shmAttributes()) {
|
||||
return loadShmTexture(m_pixmap->buffer());
|
||||
} else {
|
||||
qCDebug(KWIN_OPENGL) << "Failed to create BasicEGLSurfaceTextureWayland for a buffer of unknown type" << m_pixmap->buffer();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -57,6 +58,8 @@ void BasicEGLSurfaceTextureWayland::update(const QRegion ®ion)
|
|||
updateDmabufTexture(m_pixmap->buffer());
|
||||
} else if (m_pixmap->buffer()->shmAttributes()) {
|
||||
updateShmTexture(m_pixmap->buffer(), region);
|
||||
} else {
|
||||
qCDebug(KWIN_OPENGL) << "Failed to update BasicEGLSurfaceTextureWayland for a buffer of unknown type" << m_pixmap->buffer();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -238,6 +238,7 @@ GraphicsBuffer *Display::bufferForResource(wl_resource *resource)
|
|||
} else if (auto buffer = ShmClientBuffer::get(resource)) {
|
||||
return buffer;
|
||||
} else {
|
||||
Q_ASSERT_X(false, Q_FUNC_INFO, "Failed to find matching GraphicsBuffer for wl_resource");
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue