Better clipping.
svn path=/trunk/KDE/kdebase/workspace/; revision=805326
This commit is contained in:
parent
874ec72298
commit
33fc8c024f
1 changed files with 3 additions and 11 deletions
|
@ -494,16 +494,9 @@ void SceneXrender::Window::performPaint( int mask, QRegion region, WindowPaintDa
|
||||||
}
|
}
|
||||||
transformed_shape.setRects( rects.constData(), rects.count());
|
transformed_shape.setRects( rects.constData(), rects.count());
|
||||||
}
|
}
|
||||||
if( x != toplevel->x() || y != toplevel->y())
|
|
||||||
transformed_shape.translate( x, y );
|
transformed_shape.translate( x, y );
|
||||||
QRegion sh = shape();
|
PaintClipper pcreg( region ); // clip by the region to paint
|
||||||
if( sh != rect()) // is shaped, need additional clipping
|
PaintClipper pc( transformed_shape ); // clip by window's shape
|
||||||
{
|
|
||||||
XserverRegion clip = toXserverRegion( sh );
|
|
||||||
XFixesSetPictureClipRegion( display(), pic, 0, 0, clip );
|
|
||||||
XFixesDestroyRegion( display(), clip );
|
|
||||||
}
|
|
||||||
PaintClipper pc( region );
|
|
||||||
for( PaintClipper::Iterator iterator;
|
for( PaintClipper::Iterator iterator;
|
||||||
!iterator.isDone();
|
!iterator.isDone();
|
||||||
iterator.next())
|
iterator.next())
|
||||||
|
@ -532,7 +525,6 @@ void SceneXrender::Window::performPaint( int mask, QRegion region, WindowPaintDa
|
||||||
if( filter == ImageFilterGood )
|
if( filter == ImageFilterGood )
|
||||||
XRenderSetPictureFilter( display(), pic, const_cast< char* >( "fast" ), NULL, 0 );
|
XRenderSetPictureFilter( display(), pic, const_cast< char* >( "fast" ), NULL, 0 );
|
||||||
}
|
}
|
||||||
XFixesSetPictureClipRegion( display(), pic, 0, 0, None );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
Loading…
Reference in a new issue