summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2018-06-24 12:19:21 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2018-06-24 12:19:21 -0500
commit4ec011cd55856f3825672431b15c0318022c6948 (patch)
tree3d8312403d1a42e6626285b2129b4ba744bbed16 /kdesktop/lock
parentf2ca34345e168d4273e10e55c2db401a3b9e5c97 (diff)
downloadtdebase-4ec011cd55856f3825672431b15c0318022c6948.tar.gz
tdebase-4ec011cd55856f3825672431b15c0318022c6948.zip
Fix kdesktop_lock screensaver stuttering on modern GPUs
Diffstat (limited to 'kdesktop/lock')
-rw-r--r--kdesktop/lock/lockprocess.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc
index 5dbc4d152..7d853b0dc 100644
--- a/kdesktop/lock/lockprocess.cc
+++ b/kdesktop/lock/lockprocess.cc
@@ -872,7 +872,11 @@ void LockProcess::createSaverWindow()
info = glXGetVisualFromFBConfig(x11Display(), fbc[j]);
if( info ) {
if (argb_visual) {
- if (info->depth < 32) {
+ // Xorg can only use GPU compositing for ARGB32 8:8:8:8 visuals
+ // Ensure the selected visual is 8 bits per RGB
+ // Selecting a non-8-bit visual will result in stuttering and high
+ // CPU load, while Xorg tries to composite each frame on the CPU!
+ if ((info->depth < 32) || (info->bits_per_rgb != 8)) {
XFree( info );
info = NULL;
continue;