From 33fc8c024fa76ad84f7b8b46873b2d6fe1d33854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Thu, 8 May 2008 08:28:26 +0000 Subject: [PATCH] Better clipping. svn path=/trunk/KDE/kdebase/workspace/; revision=805326 --- scene_xrender.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/scene_xrender.cpp b/scene_xrender.cpp index f66e1b5965..ccadcc2028 100644 --- a/scene_xrender.cpp +++ b/scene_xrender.cpp @@ -494,16 +494,9 @@ void SceneXrender::Window::performPaint( int mask, QRegion region, WindowPaintDa } transformed_shape.setRects( rects.constData(), rects.count()); } - if( x != toplevel->x() || y != toplevel->y()) - transformed_shape.translate( x, y ); - QRegion sh = shape(); - if( sh != rect()) // is shaped, need additional clipping - { - XserverRegion clip = toXserverRegion( sh ); - XFixesSetPictureClipRegion( display(), pic, 0, 0, clip ); - XFixesDestroyRegion( display(), clip ); - } - PaintClipper pc( region ); + transformed_shape.translate( x, y ); + PaintClipper pcreg( region ); // clip by the region to paint + PaintClipper pc( transformed_shape ); // clip by window's shape for( PaintClipper::Iterator iterator; !iterator.isDone(); iterator.next()) @@ -532,7 +525,6 @@ void SceneXrender::Window::performPaint( int mask, QRegion region, WindowPaintDa if( filter == ImageFilterGood ) XRenderSetPictureFilter( display(), pic, const_cast< char* >( "fast" ), NULL, 0 ); } - XFixesSetPictureClipRegion( display(), pic, 0, 0, None ); } } // namespace