platforms/wayland: Print a warning message if buffer swap fails
If eglSwapBuffers() fails, frame scheduling will be broken. KWin can't recover from that, but still, having a log message might be useful for the debugging purposes.
This commit is contained in:
parent
592633eed7
commit
279aef103e
1 changed files with 7 additions and 3 deletions
|
@ -327,10 +327,14 @@ void EglWaylandBackend::presentOnSurface(EglWaylandOutput *output, const QRegion
|
|||
|
||||
if (supportsSwapBuffersWithDamage() && !output->m_damageHistory.isEmpty()) {
|
||||
QVector<EGLint> rects = regionToRects(output->m_damageHistory.constFirst(), waylandOutput);
|
||||
eglSwapBuffersWithDamageEXT(eglDisplay(), output->m_eglSurface,
|
||||
rects.data(), rects.count()/4);
|
||||
if (!eglSwapBuffersWithDamageEXT(eglDisplay(), output->m_eglSurface,
|
||||
rects.data(), rects.count() / 4)) {
|
||||
qCCritical(KWIN_WAYLAND_BACKEND, "eglSwapBuffersWithDamage() failed: %x", eglGetError());
|
||||
}
|
||||
} else {
|
||||
eglSwapBuffers(eglDisplay(), output->m_eglSurface);
|
||||
if (!eglSwapBuffers(eglDisplay(), output->m_eglSurface)) {
|
||||
qCCritical(KWIN_WAYLAND_BACKEND, "eglSwapBuffers() failed: %x", eglGetError());
|
||||
}
|
||||
}
|
||||
|
||||
if (supportsBufferAge()) {
|
||||
|
|
Loading…
Reference in a new issue