Let's go without __GL_YIELD by default for now.

svn path=/trunk/KDE/kdebase/workspace/; revision=756724
This commit is contained in:
Luboš Luňák 2008-01-03 16:44:55 +00:00
parent 0ea15119c4
commit 60c457cd2e
2 changed files with 16 additions and 1 deletions

View file

@ -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
========

View file

@ -32,7 +32,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
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;