From c561207946002a91133eb3f3b14ac82098ef009b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 18 May 2009 16:42:23 +0000 Subject: [PATCH] Do not release the bound pixmap every time the decoration get's updated. That is the reason why effects were slow when active client changed. Additional do a XSync when the decoration pixmap is painted. That ensures that the pixmap is painted before the texture from pixmap is done. BUG: 191694 svn path=/trunk/KDE/kdebase/workspace/; revision=969647 --- client.cpp | 2 ++ scene_opengl.cpp | 6 +----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/client.cpp b/client.cpp index 36a852f221..949ee41654 100644 --- a/client.cpp +++ b/client.cpp @@ -512,6 +512,8 @@ void Client::ensureDecorationPixmapsPainted() XFreeGC( display(), gc ); } } + else + XSync( display(), false ); } void Client::repaintDecorationPixmap( QPixmap& pix, const QRect& r, const QPixmap& src, QRegion reg ) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 3bcc1f27ee..3b098cce26 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -1530,12 +1530,8 @@ void SceneOpenGL::Window::paintDecoration( const QPixmap* decoration, TextureTyp } else { - if( decorationTexture->texture() != None ) - decorationTexture->release(); bool success = decorationTexture->load( decoration->handle(), decoration->size(), decoration->depth() ); - if( success ) - toplevel->resetDamage( rect ); - else + if( !success ) { kDebug( 1212 ) << "Failed to bind decoartion"; return;