kwin: Don't hold an X server grab while painting the screen

According to Pierre-Loup Griffais (Plagman on IRC) this is causing
choppy VDPAU video playback when compositing is enabled.

Removing these calls doesn't seem to cause any regressions, and the
commit that added them doesn't give a reason.  So let's just get rid
of them for now.

This commit should be cherry-picked to the stable branch if no one
else notices any regressions.

CCMAIL: kwin@kde.org
icc-effect-5.14.5
Fredrik Höglund 2012-09-12 23:00:15 +02:00
parent 1c91a1be97
commit faf27f481e
2 changed files with 1 additions and 4 deletions

View File

@ -200,14 +200,13 @@ int SceneOpenGL::paint(QRegion damage, ToplevelList toplevels)
stacking_order.append(windows[ c ]);
}
grabXServer();
XSync(display(), false);
int mask = 0;
paintScreen(&mask, &damage); // call generic implementation
m_lastMask = mask;
m_lastDamage = damage;
glFlush();
ungrabXServer();
if (m_overlayWindow->window()) // show the window only after the first pass, since
m_overlayWindow->show(); // that pass may take long

View File

@ -468,7 +468,6 @@ int SceneOpenGL::paint(QRegion damage, ToplevelList toplevels)
stacking_order.append(windows[ c ]);
}
grabXServer();
glXWaitX();
if (m_resetModelViewProjectionMatrix) {
// reset model view projection matrix if required
@ -487,7 +486,6 @@ int SceneOpenGL::paint(QRegion damage, ToplevelList toplevels)
glFlush();
ungrabXServer();
if (m_overlayWindow->window()) // show the window only after the first pass,
m_overlayWindow->show(); // since that pass may take long