Remove define KWIN_HAVE_OPENGL_COMPOSITING
Due to changes in build system we have always either OpenGL or OpenGL ES. This allows to remove the KWIN_HAVE_OPENGL_COMPOSITING define. In the effects the define is kept as KWIN_HAVE_OPENGL which can be used in future to build also an XRender only effect system.
This commit is contained in:
parent
b7d2b16b8d
commit
987bc837d9
26 changed files with 55 additions and 167 deletions
|
@ -28,30 +28,21 @@ if(KWIN_PLASMA_ACTIVE)
|
||||||
set(KWIN_BUILD_WITH_OPENGLES ON)
|
set(KWIN_BUILD_WITH_OPENGLES ON)
|
||||||
endif(KWIN_PLASMA_ACTIVE)
|
endif(KWIN_PLASMA_ACTIVE)
|
||||||
|
|
||||||
# KWIN_HAVE_OPENGL_COMPOSITING - always have either OpenGL or OpenGL ES
|
|
||||||
set( KWIN_HAVE_OPENGL_COMPOSITING 1 )
|
|
||||||
|
|
||||||
# KWIN_HAVE_XRENDER_COMPOSITING - whether XRender-based compositing support is available: may be disabled
|
# KWIN_HAVE_XRENDER_COMPOSITING - whether XRender-based compositing support is available: may be disabled
|
||||||
if( KWIN_BUILD_XRENDER_COMPOSITING )
|
if( KWIN_BUILD_XRENDER_COMPOSITING )
|
||||||
set( KWIN_HAVE_XRENDER_COMPOSITING 1 )
|
set( KWIN_HAVE_XRENDER_COMPOSITING 1 )
|
||||||
endif( KWIN_BUILD_XRENDER_COMPOSITING )
|
endif( KWIN_BUILD_XRENDER_COMPOSITING )
|
||||||
|
|
||||||
# KWIN_HAVE_OPENGLES_COMPOSITING - whether OpenGL ES-based compositing support is available
|
|
||||||
if( OPENGLES_FOUND AND KWIN_BUILD_WITH_OPENGLES)
|
|
||||||
set( KWIN_HAVE_OPENGLES_COMPOSITING 1 )
|
|
||||||
message("Compiling KWin for mobile.")
|
|
||||||
endif( OPENGLES_FOUND AND KWIN_BUILD_WITH_OPENGLES )
|
|
||||||
|
|
||||||
macro_bool_to_01( OPENGL_FOUND KWIN_HAVE_OPENGL )
|
macro_bool_to_01( OPENGL_FOUND KWIN_HAVE_OPENGL )
|
||||||
macro_bool_to_01( KWIN_HAVE_OPENGLES_COMPOSITING KWIN_HAVE_OPENGLES )
|
macro_bool_to_01( OPENGLES_FOUND KWIN_HAVE_OPENGLES )
|
||||||
|
|
||||||
if(OPENGL_FOUND)
|
if(OPENGL_FOUND)
|
||||||
include_directories(${OPENGL_INCLUDE_DIR})
|
include_directories(${OPENGL_INCLUDE_DIR})
|
||||||
endif(OPENGL_FOUND)
|
endif(OPENGL_FOUND)
|
||||||
|
|
||||||
if(OPENGLES_FOUND AND KWIN_HAVE_OPENGLES_COMPOSITING)
|
if(OPENGLES_FOUND)
|
||||||
include_directories(${OPENGLES_INCLUDE_DIR})
|
include_directories(${OPENGLES_INCLUDE_DIR})
|
||||||
endif(OPENGLES_FOUND AND KWIN_HAVE_OPENGLES_COMPOSITING)
|
endif(OPENGLES_FOUND)
|
||||||
|
|
||||||
# for things that are also used by kwin libraries
|
# for things that are also used by kwin libraries
|
||||||
configure_file(libkwineffects/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/libkwineffects/kwinconfig.h )
|
configure_file(libkwineffects/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/libkwineffects/kwinconfig.h )
|
||||||
|
|
|
@ -109,7 +109,6 @@ void Workspace::setupCompositing()
|
||||||
kDebug( 1212 ) << "X compositing";
|
kDebug( 1212 ) << "X compositing";
|
||||||
scene = new SceneBasic( this );
|
scene = new SceneBasic( this );
|
||||||
break; // don't fall through (this is a testing one) */
|
break; // don't fall through (this is a testing one) */
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
case OpenGLCompositing: {
|
case OpenGLCompositing: {
|
||||||
kDebug(1212) << "Initializing OpenGL compositing";
|
kDebug(1212) << "Initializing OpenGL compositing";
|
||||||
|
|
||||||
|
@ -145,7 +144,6 @@ void Workspace::setupCompositing()
|
||||||
// Do not Fall back to XRender - it causes problems when selfcheck fails during startup, but works later on
|
// Do not Fall back to XRender - it causes problems when selfcheck fails during startup, but works later on
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
case XRenderCompositing:
|
case XRenderCompositing:
|
||||||
kDebug(1212) << "Initializing XRender compositing";
|
kDebug(1212) << "Initializing XRender compositing";
|
||||||
|
@ -672,7 +670,6 @@ void Toplevel::addDamage(int x, int y, int w, int h)
|
||||||
damageRatio = float(damageArea) / float(rect().width()*rect().height());
|
damageRatio = float(damageArea) / float(rect().width()*rect().height());
|
||||||
repaints_region += r;
|
repaints_region += r;
|
||||||
emit damaged(this, r);
|
emit damaged(this, r);
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
// discard lanczos texture
|
// discard lanczos texture
|
||||||
if (effect_window) {
|
if (effect_window) {
|
||||||
QVariant cachedTextureVariant = effect_window->data(LanczosCacheRole);
|
QVariant cachedTextureVariant = effect_window->data(LanczosCacheRole);
|
||||||
|
@ -683,7 +680,6 @@ void Toplevel::addDamage(int x, int y, int w, int h)
|
||||||
effect_window->setData(LanczosCacheRole, QVariant());
|
effect_window->setData(LanczosCacheRole, QVariant());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
workspace()->checkCompositeTimer();
|
workspace()->checkCompositeTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -695,7 +691,6 @@ void Toplevel::addDamageFull()
|
||||||
repaints_region = rect();
|
repaints_region = rect();
|
||||||
damageRatio = 1.0;
|
damageRatio = 1.0;
|
||||||
emit damaged(this, rect());
|
emit damaged(this, rect());
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
// discard lanczos texture
|
// discard lanczos texture
|
||||||
if (effect_window) {
|
if (effect_window) {
|
||||||
QVariant cachedTextureVariant = effect_window->data(LanczosCacheRole);
|
QVariant cachedTextureVariant = effect_window->data(LanczosCacheRole);
|
||||||
|
@ -706,7 +701,6 @@ void Toplevel::addDamageFull()
|
||||||
effect_window->setData(LanczosCacheRole, QVariant());
|
effect_window->setData(LanczosCacheRole, QVariant());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
workspace()->checkCompositeTimer();
|
workspace()->checkCompositeTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,10 +78,8 @@ bool CompositingPrefs::compositingPossible()
|
||||||
kDebug(1212) << "No damage extension available";
|
kDebug(1212) << "No damage extension available";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
if (hasGlx())
|
if (hasGlx())
|
||||||
return true;
|
return true;
|
||||||
#endif
|
|
||||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
if (Extensions::renderAvailable() && Extensions::fixesAvailable())
|
if (Extensions::renderAvailable() && Extensions::fixesAvailable())
|
||||||
return true;
|
return true;
|
||||||
|
@ -110,13 +108,9 @@ QString CompositingPrefs::compositingNotPossibleReason()
|
||||||
if (!Extensions::compositeAvailable() || !Extensions::damageAvailable()) {
|
if (!Extensions::compositeAvailable() || !Extensions::damageAvailable()) {
|
||||||
return i18n("Required X extensions (XComposite and XDamage) are not available.");
|
return i18n("Required X extensions (XComposite and XDamage) are not available.");
|
||||||
}
|
}
|
||||||
#if defined( KWIN_HAVE_OPENGL_COMPOSITING ) && !defined( KWIN_HAVE_XRENDER_COMPOSITING )
|
#if !defined( KWIN_HAVE_XRENDER_COMPOSITING )
|
||||||
if (!hasGlx())
|
if (!hasGlx())
|
||||||
return i18n("GLX/OpenGL are not available and only OpenGL support is compiled.");
|
return i18n("GLX/OpenGL are not available and only OpenGL support is compiled.");
|
||||||
#elif !defined( KWIN_HAVE_OPENGL_COMPOSITING ) && defined( KWIN_HAVE_XRENDER_COMPOSITING )
|
|
||||||
if (!(Extensions::renderAvailable() && Extensions::fixesAvailable()))
|
|
||||||
return i18n("XRender/XFixes extensions are not available and only XRender support"
|
|
||||||
" is compiled.");
|
|
||||||
#else
|
#else
|
||||||
if (!(hasGlx()
|
if (!(hasGlx()
|
||||||
|| (Extensions::renderAvailable() && Extensions::fixesAvailable()))) {
|
|| (Extensions::renderAvailable() && Extensions::fixesAvailable()))) {
|
||||||
|
@ -134,11 +128,9 @@ bool CompositingPrefs::hasGlx()
|
||||||
if (s_glxDetected) {
|
if (s_glxDetected) {
|
||||||
return s_hasGlx;
|
return s_hasGlx;
|
||||||
}
|
}
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
#ifndef KWIN_HAVE_OPENGLES
|
#ifndef KWIN_HAVE_OPENGLES
|
||||||
int event_base, error_base;
|
int event_base, error_base;
|
||||||
s_hasGlx = glXQueryExtension(display(), &event_base, &error_base);
|
s_hasGlx = glXQueryExtension(display(), &event_base, &error_base);
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
s_glxDetected = true;
|
s_glxDetected = true;
|
||||||
return s_hasGlx;
|
return s_hasGlx;
|
||||||
|
@ -159,7 +151,6 @@ void CompositingPrefs::detect()
|
||||||
gl_workaround_config.writeEntry("OpenGLIsUnsafe", true);
|
gl_workaround_config.writeEntry("OpenGLIsUnsafe", true);
|
||||||
gl_workaround_config.sync();
|
gl_workaround_config.sync();
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
#ifdef KWIN_HAVE_OPENGLES
|
#ifdef KWIN_HAVE_OPENGLES
|
||||||
bool haveContext = false;
|
bool haveContext = false;
|
||||||
bool canDetect = false;
|
bool canDetect = false;
|
||||||
|
@ -232,12 +223,10 @@ void CompositingPrefs::detect()
|
||||||
#endif
|
#endif
|
||||||
gl_workaround_config.writeEntry("OpenGLIsUnsafe", false);
|
gl_workaround_config.writeEntry("OpenGLIsUnsafe", false);
|
||||||
gl_workaround_config.sync();
|
gl_workaround_config.sync();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CompositingPrefs::initGLXContext()
|
bool CompositingPrefs::initGLXContext()
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
#ifndef KWIN_HAVE_OPENGLES
|
#ifndef KWIN_HAVE_OPENGLES
|
||||||
mGLContext = NULL;
|
mGLContext = NULL;
|
||||||
KXErrorHandler handler;
|
KXErrorHandler handler;
|
||||||
|
@ -282,21 +271,16 @@ bool CompositingPrefs::initGLXContext()
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CompositingPrefs::deleteGLXContext()
|
void CompositingPrefs::deleteGLXContext()
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
#ifndef KWIN_HAVE_OPENGLES
|
#ifndef KWIN_HAVE_OPENGLES
|
||||||
if (mGLContext == NULL)
|
if (mGLContext == NULL)
|
||||||
return;
|
return;
|
||||||
glXDestroyContext(display(), mGLContext);
|
glXDestroyContext(display(), mGLContext);
|
||||||
XDestroyWindow(display(), mGLWindow);
|
XDestroyWindow(display(), mGLWindow);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CompositingPrefs::initEGLContext()
|
bool CompositingPrefs::initEGLContext()
|
||||||
|
@ -387,17 +371,14 @@ void CompositingPrefs::deleteEGLContext()
|
||||||
|
|
||||||
void CompositingPrefs::detectDriverAndVersion()
|
void CompositingPrefs::detectDriverAndVersion()
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
GLPlatform *gl = GLPlatform::instance();
|
GLPlatform *gl = GLPlatform::instance();
|
||||||
gl->detect();
|
gl->detect();
|
||||||
gl->printResults();
|
gl->printResults();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// See http://techbase.kde.org/Projects/KWin/HW for a list of some cards that are known to work.
|
// See http://techbase.kde.org/Projects/KWin/HW for a list of some cards that are known to work.
|
||||||
void CompositingPrefs::applyDriverSpecificOptions()
|
void CompositingPrefs::applyDriverSpecificOptions()
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
// Always recommend
|
// Always recommend
|
||||||
mRecommendCompositing = true;
|
mRecommendCompositing = true;
|
||||||
|
|
||||||
|
@ -405,7 +386,6 @@ void CompositingPrefs::applyDriverSpecificOptions()
|
||||||
mStrictBinding = !gl->supports(LooseBinding);
|
mStrictBinding = !gl->supports(LooseBinding);
|
||||||
if (gl->driver() == Driver_Intel)
|
if (gl->driver() == Driver_Intel)
|
||||||
mEnableVSync = false;
|
mEnableVSync = false;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -80,7 +80,6 @@ private:
|
||||||
bool mEnableDirectRendering;
|
bool mEnableDirectRendering;
|
||||||
bool mStrictBinding;
|
bool mStrictBinding;
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
#ifdef KWIN_HAVE_OPENGLES
|
#ifdef KWIN_HAVE_OPENGLES
|
||||||
EGLDisplay mEGLDisplay;
|
EGLDisplay mEGLDisplay;
|
||||||
EGLContext mEGLContext;
|
EGLContext mEGLContext;
|
||||||
|
@ -89,7 +88,6 @@ private:
|
||||||
GLXContext mGLContext;
|
GLXContext mGLContext;
|
||||||
#endif
|
#endif
|
||||||
Window mGLWindow;
|
Window mGLWindow;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1288,13 +1288,11 @@ EffectWindowImpl::EffectWindowImpl() : EffectWindow()
|
||||||
|
|
||||||
EffectWindowImpl::~EffectWindowImpl()
|
EffectWindowImpl::~EffectWindowImpl()
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
QVariant cachedTextureVariant = data(LanczosCacheRole);
|
QVariant cachedTextureVariant = data(LanczosCacheRole);
|
||||||
if (cachedTextureVariant.isValid()) {
|
if (cachedTextureVariant.isValid()) {
|
||||||
GLTexture *cachedTexture = static_cast< GLTexture*>(cachedTextureVariant.value<void*>());
|
GLTexture *cachedTexture = static_cast< GLTexture*>(cachedTextureVariant.value<void*>());
|
||||||
delete cachedTexture;
|
delete cachedTexture;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EffectWindowImpl::isPaintingEnabled()
|
bool EffectWindowImpl::isPaintingEnabled()
|
||||||
|
@ -1773,9 +1771,7 @@ EffectFrameImpl::EffectFrameImpl(EffectFrameStyle style, bool staticSize, QPoint
|
||||||
m_selection.setEnabledBorders(Plasma::FrameSvg::AllBorders);
|
m_selection.setEnabledBorders(Plasma::FrameSvg::AllBorders);
|
||||||
|
|
||||||
if (effects->compositingType() == OpenGLCompositing) {
|
if (effects->compositingType() == OpenGLCompositing) {
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
m_sceneFrame = new SceneOpenGL::EffectFrame(this);
|
m_sceneFrame = new SceneOpenGL::EffectFrame(this);
|
||||||
#endif
|
|
||||||
} else if (effects->compositingType() == XRenderCompositing) {
|
} else if (effects->compositingType() == XRenderCompositing) {
|
||||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
m_sceneFrame = new SceneXrender::EffectFrame(this);
|
m_sceneFrame = new SceneXrender::EffectFrame(this);
|
||||||
|
|
|
@ -114,28 +114,26 @@ if( NOT KWIN_MOBILE_EFFECTS )
|
||||||
endif( NOT KWIN_MOBILE_EFFECTS )
|
endif( NOT KWIN_MOBILE_EFFECTS )
|
||||||
|
|
||||||
# OpenGL-specific effects
|
# OpenGL-specific effects
|
||||||
if( KWIN_HAVE_OPENGL_COMPOSITING )
|
include( blur/CMakeLists.txt )
|
||||||
include( blur/CMakeLists.txt )
|
include( screenshot/CMakeLists.txt )
|
||||||
include( screenshot/CMakeLists.txt )
|
# OpenGL-specific effects for desktop
|
||||||
# OpenGL-specific effects for desktop
|
if( NOT KWIN_MOBILE_EFFECTS )
|
||||||
if( NOT KWIN_MOBILE_EFFECTS )
|
include( coverswitch/CMakeLists.txt )
|
||||||
include( coverswitch/CMakeLists.txt )
|
include( cube/CMakeLists.txt )
|
||||||
include( cube/CMakeLists.txt )
|
include( explosion/CMakeLists.txt )
|
||||||
include( explosion/CMakeLists.txt )
|
include( flipswitch/CMakeLists.txt )
|
||||||
include( flipswitch/CMakeLists.txt )
|
include( glide/CMakeLists.txt )
|
||||||
include( glide/CMakeLists.txt )
|
include( invert/CMakeLists.txt )
|
||||||
include( invert/CMakeLists.txt )
|
include( lookingglass/CMakeLists.txt )
|
||||||
include( lookingglass/CMakeLists.txt )
|
|
||||||
# Magnifier currently broken due to removed PaintClipper
|
# Magnifier currently broken due to removed PaintClipper
|
||||||
# include( magnifier/CMakeLists.txt )
|
# include( magnifier/CMakeLists.txt )
|
||||||
include( mousemark/CMakeLists.txt )
|
include( mousemark/CMakeLists.txt )
|
||||||
include( sheet/CMakeLists.txt )
|
include( sheet/CMakeLists.txt )
|
||||||
include( snaphelper/CMakeLists.txt )
|
include( snaphelper/CMakeLists.txt )
|
||||||
include( startupfeedback/CMakeLists.txt )
|
include( startupfeedback/CMakeLists.txt )
|
||||||
include( trackmouse/CMakeLists.txt )
|
include( trackmouse/CMakeLists.txt )
|
||||||
include( wobblywindows/CMakeLists.txt )
|
include( wobblywindows/CMakeLists.txt )
|
||||||
endif( NOT KWIN_MOBILE_EFFECTS )
|
endif( NOT KWIN_MOBILE_EFFECTS )
|
||||||
endif( KWIN_HAVE_OPENGL_COMPOSITING )
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "windowgeometry/windowgeometry_config.h"
|
#include "windowgeometry/windowgeometry_config.h"
|
||||||
#include "zoom/zoom_config.h"
|
#include "zoom/zoom_config.h"
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
#include "blur/blur_config.h"
|
#include "blur/blur_config.h"
|
||||||
#include "coverswitch/coverswitch_config.h"
|
#include "coverswitch/coverswitch_config.h"
|
||||||
#include "cube/cube_config.h"
|
#include "cube/cube_config.h"
|
||||||
|
@ -76,7 +76,7 @@ KWIN_EFFECT_CONFIG_MULTIPLE(builtins,
|
||||||
KWIN_EFFECT_CONFIG_SINGLE(windowgeometry, WindowGeometryConfig)
|
KWIN_EFFECT_CONFIG_SINGLE(windowgeometry, WindowGeometryConfig)
|
||||||
KWIN_EFFECT_CONFIG_SINGLE(zoom, ZoomEffectConfig)
|
KWIN_EFFECT_CONFIG_SINGLE(zoom, ZoomEffectConfig)
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
KWIN_EFFECT_CONFIG_SINGLE(blur, BlurEffectConfig)
|
KWIN_EFFECT_CONFIG_SINGLE(blur, BlurEffectConfig)
|
||||||
KWIN_EFFECT_CONFIG_SINGLE(coverswitch, CoverSwitchEffectConfig)
|
KWIN_EFFECT_CONFIG_SINGLE(coverswitch, CoverSwitchEffectConfig)
|
||||||
KWIN_EFFECT_CONFIG_SINGLE(cube, CubeEffectConfig)
|
KWIN_EFFECT_CONFIG_SINGLE(cube, CubeEffectConfig)
|
||||||
|
|
|
@ -55,7 +55,7 @@ LogoutEffect::LogoutEffect()
|
||||||
XChangeProperty(display(), sel, hack, hack, 8, PropModeReplace, (unsigned char*)&hack, 1);
|
XChangeProperty(display(), sel, hack, hack, 8, PropModeReplace, (unsigned char*)&hack, 1);
|
||||||
// the atom is not removed when effect is destroyed, this is temporary anyway
|
// the atom is not removed when effect is destroyed, this is temporary anyway
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
blurTexture = NULL;
|
blurTexture = NULL;
|
||||||
blurTarget = NULL;
|
blurTarget = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
@ -68,7 +68,7 @@ LogoutEffect::LogoutEffect()
|
||||||
|
|
||||||
LogoutEffect::~LogoutEffect()
|
LogoutEffect::~LogoutEffect()
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
delete blurTexture;
|
delete blurTexture;
|
||||||
delete blurTarget;
|
delete blurTarget;
|
||||||
#endif
|
#endif
|
||||||
|
@ -76,7 +76,7 @@ LogoutEffect::~LogoutEffect()
|
||||||
|
|
||||||
void LogoutEffect::reconfigure(ReconfigureFlags)
|
void LogoutEffect::reconfigure(ReconfigureFlags)
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
frameDelay = 0;
|
frameDelay = 0;
|
||||||
KConfigGroup conf = effects->effectConfig("Logout");
|
KConfigGroup conf = effects->effectConfig("Logout");
|
||||||
useBlur = conf.readEntry("UseBlur", true);
|
useBlur = conf.readEntry("UseBlur", true);
|
||||||
|
@ -90,7 +90,7 @@ void LogoutEffect::reconfigure(ReconfigureFlags)
|
||||||
|
|
||||||
void LogoutEffect::prePaintScreen(ScreenPrePaintData& data, int time)
|
void LogoutEffect::prePaintScreen(ScreenPrePaintData& data, int time)
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
if (!displayEffect && progress == 0.0) {
|
if (!displayEffect && progress == 0.0) {
|
||||||
if (blurTexture) {
|
if (blurTexture) {
|
||||||
delete blurTexture;
|
delete blurTexture;
|
||||||
|
@ -132,7 +132,7 @@ void LogoutEffect::prePaintScreen(ScreenPrePaintData& data, int time)
|
||||||
progress = qMax(0.0, progress - time / animationTime(500.0));
|
progress = qMax(0.0, progress - time / animationTime(500.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
if (blurSupported && progress > 0.0) {
|
if (blurSupported && progress > 0.0) {
|
||||||
data.mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS;
|
data.mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS;
|
||||||
}
|
}
|
||||||
|
@ -144,7 +144,7 @@ void LogoutEffect::prePaintScreen(ScreenPrePaintData& data, int time)
|
||||||
void LogoutEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data)
|
void LogoutEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data)
|
||||||
{
|
{
|
||||||
if (progress > 0.0) {
|
if (progress > 0.0) {
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
if (effects->compositingType() == KWin::OpenGLCompositing) {
|
if (effects->compositingType() == KWin::OpenGLCompositing) {
|
||||||
// In OpenGL mode we add vignetting and, if supported, a slight blur
|
// In OpenGL mode we add vignetting and, if supported, a slight blur
|
||||||
if (blurSupported) {
|
if (blurSupported) {
|
||||||
|
@ -193,13 +193,13 @@ void LogoutEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Window
|
||||||
|
|
||||||
void LogoutEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
|
void LogoutEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
if (blurSupported && progress > 0.0)
|
if (blurSupported && progress > 0.0)
|
||||||
GLRenderTarget::pushRenderTarget(blurTarget);
|
GLRenderTarget::pushRenderTarget(blurTarget);
|
||||||
#endif
|
#endif
|
||||||
effects->paintScreen(mask, region, data);
|
effects->paintScreen(mask, region, data);
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
#ifndef KWIN_HAVE_OPENGLES
|
#ifndef KWIN_HAVE_OPENGLES
|
||||||
if (effects->compositingType() == KWin::OpenGLCompositing && progress > 0.0) {
|
if (effects->compositingType() == KWin::OpenGLCompositing && progress > 0.0) {
|
||||||
if (!blurSupported) {
|
if (!blurSupported) {
|
||||||
|
@ -295,7 +295,7 @@ void LogoutEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
|
||||||
|
|
||||||
void LogoutEffect::postPaintScreen()
|
void LogoutEffect::postPaintScreen()
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
if ((progress != 0.0 && progress != 1.0) || frameDelay)
|
if ((progress != 0.0 && progress != 1.0) || frameDelay)
|
||||||
effects->addRepaintFull();
|
effects->addRepaintFull();
|
||||||
#else
|
#else
|
||||||
|
@ -334,7 +334,7 @@ void LogoutEffect::slotWindowClosed(EffectWindow* w)
|
||||||
|
|
||||||
void LogoutEffect::slotWindowDeleted(EffectWindow* w)
|
void LogoutEffect::slotWindowDeleted(EffectWindow* w)
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
windows.removeAll(w);
|
windows.removeAll(w);
|
||||||
#endif
|
#endif
|
||||||
ignoredWindows.removeAll(w);
|
ignoredWindows.removeAll(w);
|
||||||
|
@ -352,7 +352,7 @@ bool LogoutEffect::isLogoutDialog(EffectWindow* w)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
void LogoutEffect::renderVignetting()
|
void LogoutEffect::renderVignetting()
|
||||||
{
|
{
|
||||||
#ifndef KWIN_HAVE_OPENGLES
|
#ifndef KWIN_HAVE_OPENGLES
|
||||||
|
|
|
@ -62,7 +62,7 @@ private:
|
||||||
bool canDoPersistent;
|
bool canDoPersistent;
|
||||||
EffectWindowList ignoredWindows;
|
EffectWindowList ignoredWindows;
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
void renderVignetting();
|
void renderVignetting();
|
||||||
int frameDelay;
|
int frameDelay;
|
||||||
bool blurSupported, useBlur;
|
bool blurSupported, useBlur;
|
||||||
|
|
|
@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include <kdebug.h>
|
#include <kdebug.h>
|
||||||
#include <kglobalsettings.h>
|
#include <kglobalsettings.h>
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
#include <kwinglutils.h>
|
#include <kwinglutils.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -393,7 +393,7 @@ void PresentWindowsEffect::paintWindow(EffectWindow *w, int mask, QRegion region
|
||||||
QPoint point(rect.x() + rect.width() * 0.95,
|
QPoint point(rect.x() + rect.width() * 0.95,
|
||||||
rect.y() + rect.height() * 0.95);
|
rect.y() + rect.height() * 0.95);
|
||||||
winData->iconFrame->setPosition(point);
|
winData->iconFrame->setPosition(point);
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
if (effects->compositingType() == KWin::OpenGLCompositing && data.shader) {
|
if (effects->compositingType() == KWin::OpenGLCompositing && data.shader) {
|
||||||
const float a = 0.9 * data.opacity * m_decalOpacity * 0.75;
|
const float a = 0.9 * data.opacity * m_decalOpacity * 0.75;
|
||||||
data.shader->setUniform(GLShader::ModulationConstant, QVector4D(a, a, a, a));
|
data.shader->setUniform(GLShader::ModulationConstant, QVector4D(a, a, a, a));
|
||||||
|
@ -405,7 +405,7 @@ void PresentWindowsEffect::paintWindow(EffectWindow *w, int mask, QRegion region
|
||||||
QPoint point(rect.x() + rect.width() / 2,
|
QPoint point(rect.x() + rect.width() / 2,
|
||||||
rect.y() + rect.height() / 2);
|
rect.y() + rect.height() / 2);
|
||||||
winData->textFrame->setPosition(point);
|
winData->textFrame->setPosition(point);
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
if (effects->compositingType() == KWin::OpenGLCompositing && data.shader) {
|
if (effects->compositingType() == KWin::OpenGLCompositing && data.shader) {
|
||||||
const float a = 0.9 * data.opacity * m_decalOpacity * 0.75;
|
const float a = 0.9 * data.opacity * m_decalOpacity * 0.75;
|
||||||
data.shader->setUniform(GLShader::ModulationConstant, QVector4D(a, a, a, a));
|
data.shader->setUniform(GLShader::ModulationConstant, QVector4D(a, a, a, a));
|
||||||
|
|
|
@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include "resize.h"
|
#include "resize.h"
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
#include <kwinglutils.h>
|
#include <kwinglutils.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
|
@ -84,7 +84,7 @@ void ResizeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Window
|
||||||
float alpha = 0.8f;
|
float alpha = 0.8f;
|
||||||
QColor color = KColorScheme(QPalette::Normal, KColorScheme::Selection).background().color();
|
QColor color = KColorScheme(QPalette::Normal, KColorScheme::Selection).background().color();
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
if (effects->compositingType() == OpenGLCompositing) {
|
if (effects->compositingType() == OpenGLCompositing) {
|
||||||
#ifndef KWIN_HAVE_OPENGLES
|
#ifndef KWIN_HAVE_OPENGLES
|
||||||
glPushAttrib(GL_CURRENT_BIT | GL_ENABLE_BIT);
|
glPushAttrib(GL_CURRENT_BIT | GL_ENABLE_BIT);
|
||||||
|
|
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include <kglobal.h>
|
#include <kglobal.h>
|
||||||
#include <ksharedconfig.h>
|
#include <ksharedconfig.h>
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
#include <kwinglutils.h>
|
#include <kwinglutils.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
|
@ -51,7 +51,7 @@ const int MAX_TIME = 100;
|
||||||
ShowFpsEffect::ShowFpsEffect()
|
ShowFpsEffect::ShowFpsEffect()
|
||||||
: paints_pos(0)
|
: paints_pos(0)
|
||||||
, frames_pos(0)
|
, frames_pos(0)
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
, fpsText(0)
|
, fpsText(0)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
@ -162,7 +162,7 @@ void ShowFpsEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
|
||||||
++fps; // count all frames in the last second
|
++fps; // count all frames in the last second
|
||||||
if (fps > MAX_TIME)
|
if (fps > MAX_TIME)
|
||||||
fps = MAX_TIME; // keep it the same height
|
fps = MAX_TIME; // keep it the same height
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
if (effects->compositingType() == OpenGLCompositing) {
|
if (effects->compositingType() == OpenGLCompositing) {
|
||||||
paintGL(fps);
|
paintGL(fps);
|
||||||
glFinish(); // make sure all rendering is done
|
glFinish(); // make sure all rendering is done
|
||||||
|
@ -176,7 +176,7 @@ void ShowFpsEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
void ShowFpsEffect::paintGL(int fps)
|
void ShowFpsEffect::paintGL(int fps)
|
||||||
{
|
{
|
||||||
int x = this->x;
|
int x = this->x;
|
||||||
|
@ -343,7 +343,7 @@ void ShowFpsEffect::paintDrawSizeGraph(int x, int y)
|
||||||
|
|
||||||
void ShowFpsEffect::paintGraph(int x, int y, QList<int> values, QList<int> lines, bool colorize)
|
void ShowFpsEffect::paintGraph(int x, int y, QList<int> values, QList<int> lines, bool colorize)
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
if (effects->compositingType() == OpenGLCompositing) {
|
if (effects->compositingType() == OpenGLCompositing) {
|
||||||
QColor color(0, 0, 0);
|
QColor color(0, 0, 0);
|
||||||
color.setAlphaF(alpha);
|
color.setAlphaF(alpha);
|
||||||
|
@ -458,7 +458,7 @@ void ShowFpsEffect::paintFPSText(int fps)
|
||||||
{
|
{
|
||||||
if (!fpsTextRect.isValid())
|
if (!fpsTextRect.isValid())
|
||||||
return;
|
return;
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
QImage im(100, 100, QImage::Format_ARGB32);
|
QImage im(100, 100, QImage::Format_ARGB32);
|
||||||
im.fill(0);
|
im.fill(0);
|
||||||
QPainter painter(&im);
|
QPainter painter(&im);
|
||||||
|
|
|
@ -42,7 +42,7 @@ public:
|
||||||
virtual void postPaintScreen();
|
virtual void postPaintScreen();
|
||||||
enum { INSIDE_GRAPH, NOWHERE, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT }; // fps text position
|
enum { INSIDE_GRAPH, NOWHERE, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT }; // fps text position
|
||||||
private:
|
private:
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
void paintGL(int fps);
|
void paintGL(int fps);
|
||||||
#endif
|
#endif
|
||||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
|
@ -64,7 +64,7 @@ private:
|
||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
QRect fps_rect;
|
QRect fps_rect;
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
GLTexture *fpsText;
|
GLTexture *fpsText;
|
||||||
#endif
|
#endif
|
||||||
int textPosition;
|
int textPosition;
|
||||||
|
|
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include <kwinconfig.h>
|
#include <kwinconfig.h>
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
#include <kwinglutils.h>
|
#include <kwinglutils.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
|
@ -57,10 +57,8 @@ void ShowPaintEffect::paintScreen(int mask, QRegion region, ScreenPaintData& dat
|
||||||
{
|
{
|
||||||
painted = QRegion();
|
painted = QRegion();
|
||||||
effects->paintScreen(mask, region, data);
|
effects->paintScreen(mask, region, data);
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
if (effects->compositingType() == OpenGLCompositing)
|
if (effects->compositingType() == OpenGLCompositing)
|
||||||
paintGL();
|
paintGL();
|
||||||
#endif
|
|
||||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
if (effects->compositingType() == XRenderCompositing)
|
if (effects->compositingType() == XRenderCompositing)
|
||||||
paintXrender();
|
paintXrender();
|
||||||
|
@ -77,7 +75,7 @@ void ShowPaintEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
|
||||||
|
|
||||||
void ShowPaintEffect::paintGL()
|
void ShowPaintEffect::paintGL()
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
#ifndef KWIN_HAVE_OPENGLES
|
#ifndef KWIN_HAVE_OPENGLES
|
||||||
glPushAttrib(GL_CURRENT_BIT | GL_ENABLE_BIT);
|
glPushAttrib(GL_CURRENT_BIT | GL_ENABLE_BIT);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include <kdebug.h>
|
#include <kdebug.h>
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
#include <kwinglutils.h>
|
#include <kwinglutils.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ void TaskbarThumbnailEffect::paintWindow(EffectWindow* w, int mask, QRegion regi
|
||||||
thumbData.opacity *= data.opacity;
|
thumbData.opacity *= data.opacity;
|
||||||
QRect r;
|
QRect r;
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
if (effects->compositingType() == KWin::OpenGLCompositing) {
|
if (effects->compositingType() == KWin::OpenGLCompositing) {
|
||||||
if (data.shader) {
|
if (data.shader) {
|
||||||
thumbData.shader = data.shader;
|
thumbData.shader = data.shader;
|
||||||
|
|
|
@ -112,7 +112,6 @@ void TrackMouseEffect::paintScreen(int mask, QRegion region, ScreenPaintData& da
|
||||||
effects->paintScreen(mask, region, data); // paint normal screen
|
effects->paintScreen(mask, region, data); // paint normal screen
|
||||||
if (!active)
|
if (!active)
|
||||||
return;
|
return;
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
if (texture) {
|
if (texture) {
|
||||||
#ifndef KWIN_HAVE_OPENGLES
|
#ifndef KWIN_HAVE_OPENGLES
|
||||||
glPushAttrib(GL_CURRENT_BIT | GL_ENABLE_BIT);
|
glPushAttrib(GL_CURRENT_BIT | GL_ENABLE_BIT);
|
||||||
|
@ -140,7 +139,6 @@ void TrackMouseEffect::paintScreen(int mask, QRegion region, ScreenPaintData& da
|
||||||
glPopAttrib();
|
glPopAttrib();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackMouseEffect::postPaintScreen()
|
void TrackMouseEffect::postPaintScreen()
|
||||||
|
@ -203,14 +201,12 @@ QRect TrackMouseEffect::starRect(int num) const
|
||||||
|
|
||||||
void TrackMouseEffect::loadTexture()
|
void TrackMouseEffect::loadTexture()
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
QString file = KGlobal::dirs()->findResource("appdata", "trackmouse.png");
|
QString file = KGlobal::dirs()->findResource("appdata", "trackmouse.png");
|
||||||
if (file.isEmpty())
|
if (file.isEmpty())
|
||||||
return;
|
return;
|
||||||
QImage im(file);
|
QImage im(file);
|
||||||
texture = new GLTexture(im);
|
texture = new GLTexture(im);
|
||||||
textureSize = im.size();
|
textureSize = im.size();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -133,7 +133,6 @@ ZoomEffect::~ZoomEffect()
|
||||||
|
|
||||||
void ZoomEffect::showCursor()
|
void ZoomEffect::showCursor()
|
||||||
{
|
{
|
||||||
#if defined(KWIN_HAVE_OPENGL_COMPOSITING) || defined(KWIN_HAVE_XRENDER_COMPOSITING)
|
|
||||||
if (isMouseHidden) {
|
if (isMouseHidden) {
|
||||||
// show the previously hidden mouse-pointer again and free the loaded texture/picture.
|
// show the previously hidden mouse-pointer again and free the loaded texture/picture.
|
||||||
Display* display = QX11Info::display();
|
Display* display = QX11Info::display();
|
||||||
|
@ -144,12 +143,10 @@ void ZoomEffect::showCursor()
|
||||||
xrenderPicture = 0;
|
xrenderPicture = 0;
|
||||||
isMouseHidden = false;
|
isMouseHidden = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoomEffect::hideCursor()
|
void ZoomEffect::hideCursor()
|
||||||
{
|
{
|
||||||
#if defined(KWIN_HAVE_OPENGL_COMPOSITING) || defined(KWIN_HAVE_XRENDER_COMPOSITING)
|
|
||||||
if (!isMouseHidden) {
|
if (!isMouseHidden) {
|
||||||
// try to load the cursor-theme into a OpenGL texture and if successful then hide the mouse-pointer
|
// try to load the cursor-theme into a OpenGL texture and if successful then hide the mouse-pointer
|
||||||
recreateTexture();
|
recreateTexture();
|
||||||
|
@ -159,7 +156,6 @@ void ZoomEffect::hideCursor()
|
||||||
isMouseHidden = true;
|
isMouseHidden = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoomEffect::recreateTexture()
|
void ZoomEffect::recreateTexture()
|
||||||
|
@ -185,7 +181,7 @@ void ZoomEffect::recreateTexture()
|
||||||
imageWidth = ximg->width;
|
imageWidth = ximg->width;
|
||||||
imageHeight = ximg->height;
|
imageHeight = ximg->height;
|
||||||
QImage img((uchar*)ximg->pixels, imageWidth, imageHeight, QImage::Format_ARGB32_Premultiplied);
|
QImage img((uchar*)ximg->pixels, imageWidth, imageHeight, QImage::Format_ARGB32_Premultiplied);
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
if (effects->compositingType() == OpenGLCompositing)
|
if (effects->compositingType() == OpenGLCompositing)
|
||||||
texture = new GLTexture(img);
|
texture = new GLTexture(img);
|
||||||
#endif
|
#endif
|
||||||
|
@ -336,7 +332,7 @@ void ZoomEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
|
||||||
QPoint p = QCursor::pos();
|
QPoint p = QCursor::pos();
|
||||||
QRect rect(p.x() * zoom + data.xTranslate, p.y() * zoom + data.yTranslate, w, h);
|
QRect rect(p.x() * zoom + data.xTranslate, p.y() * zoom + data.yTranslate, w, h);
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL
|
||||||
if (texture) {
|
if (texture) {
|
||||||
#ifndef KWIN_HAVE_OPENGLES
|
#ifndef KWIN_HAVE_OPENGLES
|
||||||
glPushAttrib(GL_CURRENT_BIT | GL_ENABLE_BIT);
|
glPushAttrib(GL_CURRENT_BIT | GL_ENABLE_BIT);
|
||||||
|
|
|
@ -89,12 +89,6 @@ KWinCompositingConfig::KWinCompositingConfig(QWidget *parent, const QVariantList
|
||||||
|
|
||||||
#define OPENGL_INDEX 0
|
#define OPENGL_INDEX 0
|
||||||
#define XRENDER_INDEX 1
|
#define XRENDER_INDEX 1
|
||||||
#ifndef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
ui.compositingType->removeItem(OPENGL_INDEX);
|
|
||||||
ui.glGroup->setEnabled(false);
|
|
||||||
#define OPENGL_INDEX -1
|
|
||||||
#define XRENDER_INDEX 0
|
|
||||||
#endif
|
|
||||||
#ifndef KWIN_HAVE_XRENDER_COMPOSITING
|
#ifndef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
ui.compositingType->removeItem(XRENDER_INDEX);
|
ui.compositingType->removeItem(XRENDER_INDEX);
|
||||||
ui.xrenderGroup->setEnabled(false);
|
ui.xrenderGroup->setEnabled(false);
|
||||||
|
|
|
@ -22,10 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "lanczosfilter.h"
|
#include "lanczosfilter.h"
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
#include <kwinglutils.h>
|
#include <kwinglutils.h>
|
||||||
#include <kwinglplatform.h>
|
#include <kwinglplatform.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <kwineffects.h>
|
#include <kwineffects.h>
|
||||||
#include <KDE/KGlobalSettings>
|
#include <KDE/KGlobalSettings>
|
||||||
|
@ -38,21 +36,17 @@ namespace KWin
|
||||||
|
|
||||||
LanczosFilter::LanczosFilter(QObject* parent)
|
LanczosFilter::LanczosFilter(QObject* parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
, m_offscreenTex(0)
|
, m_offscreenTex(0)
|
||||||
, m_offscreenTarget(0)
|
, m_offscreenTarget(0)
|
||||||
, m_shader(0)
|
, m_shader(0)
|
||||||
#endif
|
|
||||||
, m_inited(false)
|
, m_inited(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
LanczosFilter::~LanczosFilter()
|
LanczosFilter::~LanczosFilter()
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
delete m_offscreenTarget;
|
delete m_offscreenTarget;
|
||||||
delete m_offscreenTex;
|
delete m_offscreenTex;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LanczosFilter::init()
|
void LanczosFilter::init()
|
||||||
|
@ -60,7 +54,6 @@ void LanczosFilter::init()
|
||||||
if (m_inited)
|
if (m_inited)
|
||||||
return;
|
return;
|
||||||
m_inited = true;
|
m_inited = true;
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
const bool force = (qstrcmp(qgetenv("KWIN_FORCE_LANCZOS"), "1") == 0);
|
const bool force = (qstrcmp(qgetenv("KWIN_FORCE_LANCZOS"), "1") == 0);
|
||||||
if (force) {
|
if (force) {
|
||||||
kWarning(1212) << "Lanczos Filter forced on by environment variable";
|
kWarning(1212) << "Lanczos Filter forced on by environment variable";
|
||||||
|
@ -81,13 +74,11 @@ void LanczosFilter::init()
|
||||||
delete m_shader;
|
delete m_shader;
|
||||||
m_shader = 0;
|
m_shader = 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LanczosFilter::updateOffscreenSurfaces()
|
void LanczosFilter::updateOffscreenSurfaces()
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
int w = displayWidth();
|
int w = displayWidth();
|
||||||
int h = displayHeight();
|
int h = displayHeight();
|
||||||
if (!GLTexture::NPOTTextureSupported()) {
|
if (!GLTexture::NPOTTextureSupported()) {
|
||||||
|
@ -104,7 +95,6 @@ void LanczosFilter::updateOffscreenSurfaces()
|
||||||
m_offscreenTex->setWrapMode(GL_CLAMP_TO_EDGE);
|
m_offscreenTex->setWrapMode(GL_CLAMP_TO_EDGE);
|
||||||
m_offscreenTarget = new GLRenderTarget(m_offscreenTex);
|
m_offscreenTarget = new GLRenderTarget(m_offscreenTex);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static float sinc(float x)
|
static float sinc(float x)
|
||||||
|
@ -123,7 +113,6 @@ static float lanczos(float x, float a)
|
||||||
return sinc(x) * sinc(x / a);
|
return sinc(x) * sinc(x / a);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
void LanczosShader::createKernel(float delta, int *size)
|
void LanczosShader::createKernel(float delta, int *size)
|
||||||
{
|
{
|
||||||
const float a = 2.0;
|
const float a = 2.0;
|
||||||
|
@ -163,11 +152,9 @@ void LanczosShader::createOffsets(int count, float width, Qt::Orientation direct
|
||||||
QVector2D(i / width, 0) : QVector2D(0, i / width);
|
QVector2D(i / width, 0) : QVector2D(0, i / width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
void LanczosFilter::performPaint(EffectWindowImpl* w, int mask, QRegion region, WindowPaintData& data)
|
void LanczosFilter::performPaint(EffectWindowImpl* w, int mask, QRegion region, WindowPaintData& data)
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
if (effects->compositingType() == KWin::OpenGLCompositing && (data.xScale < 0.9 || data.yScale < 0.9) &&
|
if (effects->compositingType() == KWin::OpenGLCompositing && (data.xScale < 0.9 || data.yScale < 0.9) &&
|
||||||
KGlobalSettings::graphicEffectsLevel() & KGlobalSettings::SimpleAnimationEffects) {
|
KGlobalSettings::graphicEffectsLevel() & KGlobalSettings::SimpleAnimationEffects) {
|
||||||
if (!m_inited)
|
if (!m_inited)
|
||||||
|
@ -371,13 +358,11 @@ void LanczosFilter::performPaint(EffectWindowImpl* w, int mask, QRegion region,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} // if ( effects->compositingType() == KWin::OpenGLCompositing )
|
} // if ( effects->compositingType() == KWin::OpenGLCompositing )
|
||||||
#endif
|
|
||||||
w->sceneWindow()->performPaint(mask, region, data);
|
w->sceneWindow()->performPaint(mask, region, data);
|
||||||
} // End of function
|
} // End of function
|
||||||
|
|
||||||
void LanczosFilter::timerEvent(QTimerEvent *event)
|
void LanczosFilter::timerEvent(QTimerEvent *event)
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
if (event->timerId() == m_timer.timerId()) {
|
if (event->timerId() == m_timer.timerId()) {
|
||||||
m_timer.stop();
|
m_timer.stop();
|
||||||
|
|
||||||
|
@ -395,12 +380,10 @@ void LanczosFilter::timerEvent(QTimerEvent *event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LanczosFilter::prepareRenderStates(GLTexture* tex, double opacity, double brightness, double saturation)
|
void LanczosFilter::prepareRenderStates(GLTexture* tex, double opacity, double brightness, double saturation)
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
#ifndef KWIN_HAVE_OPENGLES
|
#ifndef KWIN_HAVE_OPENGLES
|
||||||
const bool alpha = true;
|
const bool alpha = true;
|
||||||
// setup blending of transparent windows
|
// setup blending of transparent windows
|
||||||
|
@ -509,12 +492,10 @@ void LanczosFilter::prepareRenderStates(GLTexture* tex, double opacity, double b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LanczosFilter::restoreRenderStates(GLTexture* tex, double opacity, double brightness, double saturation)
|
void LanczosFilter::restoreRenderStates(GLTexture* tex, double opacity, double brightness, double saturation)
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
#ifndef KWIN_HAVE_OPENGLES
|
#ifndef KWIN_HAVE_OPENGLES
|
||||||
if (opacity != 1.0 || saturation != 1.0 || brightness != 1.0f) {
|
if (opacity != 1.0 || saturation != 1.0 || brightness != 1.0f) {
|
||||||
if (saturation != 1.0 && tex->saturationSupported()) {
|
if (saturation != 1.0 && tex->saturationSupported()) {
|
||||||
|
@ -532,13 +513,11 @@ void LanczosFilter::restoreRenderStates(GLTexture* tex, double opacity, double b
|
||||||
|
|
||||||
glPopAttrib(); // ENABLE_BIT
|
glPopAttrib(); // ENABLE_BIT
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************
|
/************************************************
|
||||||
* LanczosShader
|
* LanczosShader
|
||||||
************************************************/
|
************************************************/
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
LanczosShader::LanczosShader(QObject* parent)
|
LanczosShader::LanczosShader(QObject* parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_shader(0)
|
, m_shader(0)
|
||||||
|
@ -690,7 +669,6 @@ bool LanczosShader::init()
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
|
@ -38,9 +38,7 @@ class WindowPaintData;
|
||||||
class GLTexture;
|
class GLTexture;
|
||||||
class GLRenderTarget;
|
class GLRenderTarget;
|
||||||
class GLShader;
|
class GLShader;
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
class LanczosShader;
|
class LanczosShader;
|
||||||
#endif
|
|
||||||
|
|
||||||
class LanczosFilter
|
class LanczosFilter
|
||||||
: public QObject
|
: public QObject
|
||||||
|
@ -61,14 +59,11 @@ private:
|
||||||
void restoreRenderStates(GLTexture* tex, double opacity, double brightness, double saturation);
|
void restoreRenderStates(GLTexture* tex, double opacity, double brightness, double saturation);
|
||||||
GLTexture *m_offscreenTex;
|
GLTexture *m_offscreenTex;
|
||||||
GLRenderTarget *m_offscreenTarget;
|
GLRenderTarget *m_offscreenTarget;
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
LanczosShader *m_shader;
|
LanczosShader *m_shader;
|
||||||
#endif
|
|
||||||
QBasicTimer m_timer;
|
QBasicTimer m_timer;
|
||||||
bool m_inited;
|
bool m_inited;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
class LanczosShader
|
class LanczosShader
|
||||||
: public QObject
|
: public QObject
|
||||||
{
|
{
|
||||||
|
@ -94,7 +89,6 @@ private:
|
||||||
QVector4D m_kernel[16];
|
QVector4D m_kernel[16];
|
||||||
uint m_arbProgram; // TODO: GLuint
|
uint m_arbProgram; // TODO: GLuint
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,6 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* KWIN_HAVE_OPENGL_COMPOSITING - whether OpenGL-based compositing support is available */
|
|
||||||
#cmakedefine KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
|
|
||||||
/* KWIN_HAVE_XRENDER_COMPOSITING - whether XRender-based compositing support is available */
|
/* KWIN_HAVE_XRENDER_COMPOSITING - whether XRender-based compositing support is available */
|
||||||
#cmakedefine KWIN_HAVE_XRENDER_COMPOSITING
|
#cmakedefine KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
|
|
||||||
|
|
|
@ -686,21 +686,17 @@ QRegion PaintClipper::paintArea()
|
||||||
struct PaintClipper::Iterator::Data {
|
struct PaintClipper::Iterator::Data {
|
||||||
Data() : index(0) {}
|
Data() : index(0) {}
|
||||||
int index;
|
int index;
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
QVector< QRect > rects;
|
QVector< QRect > rects;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
PaintClipper::Iterator::Iterator()
|
PaintClipper::Iterator::Iterator()
|
||||||
: data(new Data)
|
: data(new Data)
|
||||||
{
|
{
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
if (clip() && effects->compositingType() == OpenGLCompositing) {
|
if (clip() && effects->compositingType() == OpenGLCompositing) {
|
||||||
data->rects = paintArea().rects();
|
data->rects = paintArea().rects();
|
||||||
data->index = -1;
|
data->index = -1;
|
||||||
next(); // move to the first one
|
next(); // move to the first one
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
if (clip() && effects->compositingType() == XRenderCompositing) {
|
if (clip() && effects->compositingType() == XRenderCompositing) {
|
||||||
XserverRegion region = toXserverRegion(paintArea());
|
XserverRegion region = toXserverRegion(paintArea());
|
||||||
|
@ -723,10 +719,8 @@ bool PaintClipper::Iterator::isDone()
|
||||||
{
|
{
|
||||||
if (!clip())
|
if (!clip())
|
||||||
return data->index == 1; // run once
|
return data->index == 1; // run once
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
if (effects->compositingType() == OpenGLCompositing)
|
if (effects->compositingType() == OpenGLCompositing)
|
||||||
return data->index >= data->rects.count(); // run once per each area
|
return data->index >= data->rects.count(); // run once per each area
|
||||||
#endif
|
|
||||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
if (effects->compositingType() == XRenderCompositing)
|
if (effects->compositingType() == XRenderCompositing)
|
||||||
return data->index == 1; // run once
|
return data->index == 1; // run once
|
||||||
|
@ -743,10 +737,8 @@ QRect PaintClipper::Iterator::boundingRect() const
|
||||||
{
|
{
|
||||||
if (!clip())
|
if (!clip())
|
||||||
return infiniteRegion();
|
return infiniteRegion();
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
if (effects->compositingType() == OpenGLCompositing)
|
if (effects->compositingType() == OpenGLCompositing)
|
||||||
return data->rects[ data->index ];
|
return data->rects[ data->index ];
|
||||||
#endif
|
|
||||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
if (effects->compositingType() == XRenderCompositing)
|
if (effects->compositingType() == XRenderCompositing)
|
||||||
return paintArea().boundingRect();
|
return paintArea().boundingRect();
|
||||||
|
|
|
@ -58,7 +58,6 @@ int currentRefreshRate()
|
||||||
int rate = -1;
|
int rate = -1;
|
||||||
if (options->refreshRate > 0) // use manually configured refresh rate
|
if (options->refreshRate > 0) // use manually configured refresh rate
|
||||||
rate = options->refreshRate;
|
rate = options->refreshRate;
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
#ifndef KWIN_HAVE_OPENGLES
|
#ifndef KWIN_HAVE_OPENGLES
|
||||||
else if (GLPlatform::instance()->driver() == Driver_NVidia) {
|
else if (GLPlatform::instance()->driver() == Driver_NVidia) {
|
||||||
QProcess nvidia_settings;
|
QProcess nvidia_settings;
|
||||||
|
@ -75,7 +74,6 @@ int currentRefreshRate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
#ifdef HAVE_XRANDR
|
#ifdef HAVE_XRANDR
|
||||||
else if (Extensions::randrAvailable()) {
|
else if (Extensions::randrAvailable()) {
|
||||||
XRRScreenConfiguration *config = XRRGetScreenInfo(display(), rootWindow());
|
XRRScreenConfiguration *config = XRRGetScreenInfo(display(), rootWindow());
|
||||||
|
|
|
@ -84,8 +84,6 @@ Sources and other compositing managers:
|
||||||
// normally only few of them are enabled
|
// normally only few of them are enabled
|
||||||
//#define CHECK_GL_ERROR
|
//#define CHECK_GL_ERROR
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
|
|
||||||
#include <X11/extensions/Xcomposite.h>
|
#include <X11/extensions/Xcomposite.h>
|
||||||
|
|
||||||
#include <qpainter.h>
|
#include <qpainter.h>
|
||||||
|
@ -1734,5 +1732,3 @@ bool SceneOpenGLShadow::prepareBackend()
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -27,8 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include "kwinglutils.h"
|
#include "kwinglutils.h"
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
|
|
||||||
#ifdef HAVE_XSHM
|
#ifdef HAVE_XSHM
|
||||||
#include <X11/extensions/XShm.h>
|
#include <X11/extensions/XShm.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -247,5 +245,3 @@ private:
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -22,9 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "atoms.h"
|
#include "atoms.h"
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
#include "toplevel.h"
|
#include "toplevel.h"
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
#include "scene_opengl.h"
|
#include "scene_opengl.h"
|
||||||
#endif
|
|
||||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
#include "scene_xrender.h"
|
#include "scene_xrender.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,9 +50,7 @@ Shadow *Shadow::createShadow(Toplevel *toplevel)
|
||||||
if (!data.isEmpty()) {
|
if (!data.isEmpty()) {
|
||||||
Shadow *shadow = NULL;
|
Shadow *shadow = NULL;
|
||||||
if (effects->compositingType() == OpenGLCompositing) {
|
if (effects->compositingType() == OpenGLCompositing) {
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
shadow = new SceneOpenGLShadow(toplevel);
|
shadow = new SceneOpenGLShadow(toplevel);
|
||||||
#endif
|
|
||||||
} else if (effects->compositingType() == XRenderCompositing) {
|
} else if (effects->compositingType() == XRenderCompositing) {
|
||||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
shadow = new SceneXRenderShadow(toplevel);
|
shadow = new SceneXRenderShadow(toplevel);
|
||||||
|
|
Loading…
Reference in a new issue