From 9b9f4619b0b2d6cd398c99f5669f380680c15dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 26 Jun 2011 12:02:42 +0200 Subject: [PATCH] Remove scissoring code from PaintClipper Not used any more and means we don't have OpenGL code in kwineffects. --- libkwineffects/kwineffects.cpp | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/libkwineffects/kwineffects.cpp b/libkwineffects/kwineffects.cpp index aabcabf8b2..8d98d9f87d 100644 --- a/libkwineffects/kwineffects.cpp +++ b/libkwineffects/kwineffects.cpp @@ -711,11 +711,6 @@ PaintClipper::Iterator::Iterator() { #ifdef KWIN_HAVE_OPENGL_COMPOSITING if (clip() && effects->compositingType() == OpenGLCompositing) { -#ifndef KWIN_HAVE_OPENGLES - glPushAttrib(GL_SCISSOR_BIT); -#endif - if (!GLRenderTarget::isRenderTargetBound()) - glEnable(GL_SCISSOR_TEST); data->rects = paintArea().rects(); data->index = -1; next(); // move to the first one @@ -732,15 +727,6 @@ PaintClipper::Iterator::Iterator() PaintClipper::Iterator::~Iterator() { -#ifdef KWIN_HAVE_OPENGL_COMPOSITING - if (clip() && effects->compositingType() == OpenGLCompositing) { - if (!GLRenderTarget::isRenderTargetBound()) - glDisable(GL_SCISSOR_TEST); -#ifndef KWIN_HAVE_OPENGLES - glPopAttrib(); -#endif - } -#endif #ifdef KWIN_HAVE_XRENDER_COMPOSITING if (clip() && effects->compositingType() == XRenderCompositing) XFixesSetPictureClipRegion(display(), effects->xrenderBufferPicture(), 0, 0, None); @@ -766,13 +752,6 @@ bool PaintClipper::Iterator::isDone() void PaintClipper::Iterator::next() { data->index++; -#ifdef KWIN_HAVE_OPENGL_COMPOSITING - if (clip() && effects->compositingType() == OpenGLCompositing && !GLRenderTarget::isRenderTargetBound() && data->index < data->rects.count()) { - const QRect& r = data->rects[ data->index ]; - // Scissor rect has to be given in OpenGL coords - glScissor(r.x(), displayHeight() - r.y() - r.height(), r.width(), r.height()); - } -#endif } QRect PaintClipper::Iterator::boundingRect() const