From 60c457cd2eb8b75e9d9893f03fea26e5898127f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Thu, 3 Jan 2008 16:44:55 +0000 Subject: [PATCH] Let's go without __GL_YIELD by default for now. svn path=/trunk/KDE/kdebase/workspace/; revision=756724 --- NOTES_4_0 | 8 ++++++++ nvidiahack.cpp | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/NOTES_4_0 b/NOTES_4_0 index ca8a012e7e..5c9b63c665 100644 --- a/NOTES_4_0 +++ b/NOTES_4_0 @@ -7,6 +7,14 @@ This document is for creating the 4.0 release notes. There are 3 parts: ================= +- Performance/smoothness with nVidia cards: Smoothness of KWin rendering + can be improved by setting env.variable KWIN_NVIDIA_HACK to 1 (e.g. append + "export KWIN_NVIDIA_HACK=1" to your ~/.profile file). This sets __GL_YIELD=NOTHING + for KWin, letting KWin use more CPU time for OpenGL operations, however + at the expense of affecting performance of other applications. This is + therefore disabled by default. This setting may be removed in the future + if the negative impact becomes insignificant. See section "OPENGL YIELD BEHAVIOR" + in README.txt for nVidia cards. Comments ======== diff --git a/nvidiahack.cpp b/nvidiahack.cpp index ccf1fad579..da41b00394 100644 --- a/nvidiahack.cpp +++ b/nvidiahack.cpp @@ -32,7 +32,14 @@ along with this program. If not, see . class kwinnvidiahack { public: - kwinnvidiahack() { setenv( "__GL_YIELD", "NOTHING", true ); } + kwinnvidiahack(); }; +kwinnvidiahack::kwinnvidiahack() + { + const char* env = getenv( "KWIN_NVIDIA_HACK" ); + if( env != NULL && env[ 0 ] != '0' ) + setenv( "__GL_YIELD", "NOTHING", true ); + } + kwinnvidiahack kwinnvidiahackinst;