kwin: don't wait for vsync when nothing has been painted
This commit is contained in:
parent
815a0fe681
commit
dbc48c91f9
2 changed files with 6 additions and 3 deletions
|
@ -190,7 +190,9 @@ void SceneOpenGL::paint(QRegion damage, ToplevelList toplevels)
|
|||
if (m_overlayWindow->window()) // show the window only after the first pass, since
|
||||
m_overlayWindow->show(); // that pass may take long
|
||||
lastRenderTime = renderTimer.elapsed();
|
||||
flushBuffer(mask, damage);
|
||||
if (!damage.isEmpty()) {
|
||||
flushBuffer(mask, damage);
|
||||
}
|
||||
// do cleanup
|
||||
stacking_order.clear();
|
||||
checkGLError("PostPaint");
|
||||
|
@ -203,7 +205,6 @@ void SceneOpenGL::waitSync()
|
|||
|
||||
void SceneOpenGL::flushBuffer(int mask, QRegion damage)
|
||||
{
|
||||
Q_UNUSED(damage)
|
||||
glFlush();
|
||||
if (mask & PAINT_SCREEN_REGION && surfaceHasSubPost && eglPostSubBufferNV) {
|
||||
QRect damageRect = damage.boundingRect();
|
||||
|
|
|
@ -465,7 +465,9 @@ void SceneOpenGL::paint(QRegion damage, ToplevelList toplevels)
|
|||
if (m_overlayWindow->window()) // show the window only after the first pass, since
|
||||
m_overlayWindow->show(); // that pass may take long
|
||||
lastRenderTime = renderTimer.elapsed();
|
||||
flushBuffer(mask, damage);
|
||||
if (!damage.isEmpty()) {
|
||||
flushBuffer(mask, damage);
|
||||
}
|
||||
// do cleanup
|
||||
stacking_order.clear();
|
||||
checkGLError("PostPaint");
|
||||
|
|
Loading…
Reference in a new issue