Commit a6b8844e authored by Thomas Lübking's avatar Thomas Lübking
Browse files

remove nvidiahack lib

1. it apparently is ineffective
2. if it was effective, it's current behavior would be not exactly helpful
   (sets __GL_YIELD to NOTHING, causing busy waits on doublebuffer swapping)
3. it does for sure pollute the doublebuffer/usleep detection (setenv is set to override),
   ie. the overehad detection code gets a different opinion on __GL_YIELD than libGL

REVIEW: 111858
CCBUG: 322060
parent 7ef20cc7
......@@ -313,8 +313,6 @@ if(OPENGL_FOUND)
if (DL_LIBRARY)
target_link_libraries(kdeinit_kwin ${DL_LIBRARY})
endif()
# must be after opengl, to be initialized first by the linker
target_link_libraries(kdeinit_kwin kwinnvidiahack)
elseif(OPENGLES_FOUND)
target_link_libraries(kdeinit_kwin ${kwinLibs} kwinglesutils ${OPENGLES_LIBRARIES})
set_target_properties(kdeinit_kwin PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGLES")
......@@ -333,18 +331,6 @@ if(OPENGLES_FOUND)
install(TARGETS kwin_gles ${INSTALL_TARGETS_DEFAULT_ARGS} )
endif()
########### next target ###############
set( kwinnvidiahack_LIB_SRCS
nvidiahack.cpp )
kde4_add_library(kwinnvidiahack SHARED ${kwinnvidiahack_LIB_SRCS})
set_target_properties(kwinnvidiahack PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
set_target_properties(kwinnvidiahack PROPERTIES OUTPUT_NAME ${KWIN_NAME}nvidiahack)
install(TARGETS kwinnvidiahack ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
########### install files ###############
install( FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} RENAME ${KWIN_NAME}.kcfg )
......
/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2007 Lubos Lunak <l.lunak@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
// krazy:skip
/*
The only purpose of this file is to be later in the link order than
(nvidia's) libGL, thus being initialized by the dynamic linker before it,
allowing it to set __GL_YIELD=NOTHING soon enough for libGL to notice it.
*/
#include <stdlib.h>
#include <kdefakes.h>
class kwinnvidiahack
{
public:
kwinnvidiahack();
};
kwinnvidiahack::kwinnvidiahack()
{
const char* env = getenv("KWIN_NVIDIA_HACK");
#if 1 // turned on by default
if (env == NULL || env[ 0 ] != '0')
setenv("__GL_YIELD", "NOTHING", true);
#else // turned off by default
if (env != NULL && env[ 0 ] != '0')
setenv("__GL_YIELD", "NOTHING", true);
#endif
}
kwinnvidiahack kwinnvidiahackinst;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment