diff options
author | Krisztian Pinter <pin.terminator@gmail.com> | 2014-03-22 01:49:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-28 11:58:52 +0000 |
commit | 06db1edf617b537d774f487e0ab7d3528c5626df (patch) | |
tree | 814706c097b69a89982bfa3cc8c3c1e0c40e637c /canvas | |
parent | 42877b3478074e64d14bf8ffc3b31cb3a2a86d87 (diff) |
fdo#38844 Remove XOR rendering code from canvas module
Change-Id: Ie0c6b2950184bd3843baae59eff08a2f4e9e1b9c
Reviewed-on: https://gerrit.libreoffice.org/8715
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/vcl/spritehelper.cxx | 73 |
1 files changed, 2 insertions, 71 deletions
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx index 541115884f29..fc6e54a798f5 100644 --- a/canvas/source/vcl/spritehelper.cxx +++ b/canvas/source/vcl/spritehelper.cxx @@ -253,31 +253,6 @@ namespace vclcanvas // the final sprite output position. aClipPoly.transform( aTransform ); -#if ! defined WNT && ! defined MACOSX - // non-Windows only - bAtLeastOnePolygon is - // only used in non-WNT code below - - // check whether maybe the clip consists - // solely out of rectangular polygons. If this - // is the case, enforce using the triangle - // clip region setup - non-optimized X11 - // drivers tend to perform abyssmally on - // XPolygonRegion, which is used internally, - // when filling complex polypolygons. - bool bAtLeastOnePolygon( false ); - const sal_Int32 nPolygons( aClipPoly.count() ); - - for( sal_Int32 i=0; i<nPolygons; ++i ) - { - if( !::basegfx::tools::isRectangle( - aClipPoly.getB2DPolygon(i)) ) - { - bAtLeastOnePolygon = true; - break; - } - } -#endif - if( mbShowSpriteBounds ) { // Paint green sprite clip area @@ -287,52 +262,8 @@ namespace vclcanvas rTargetSurface.DrawPolyPolygon(PolyPolygon(aClipPoly)); // #i76339# } -#if ! defined WNT && ! defined MACOSX - // as a matter of fact, this fast path only - // performs well for X11 - under Windows, the - // clip via SetTriangleClipRegion is faster. - if( bAtLeastOnePolygon && - bBufferedUpdate && - ::rtl::math::approxEqual(fAlpha, 1.0) && - !maContent->IsTransparent() ) - { - // fast path for slide transitions - // (buffered, no alpha, no mask (because - // full slide is contained in the sprite)) - - // XOR bitmap onto backbuffer, clear area - // that should be _visible_ with black, - // XOR bitmap again on top of that - - // result: XOR cancels out where no black - // has been rendered, and yields the - // original bitmap, where black is - // underneath. - rTargetSurface.Push( PUSH_RASTEROP ); - rTargetSurface.SetRasterOp( ROP_XOR ); - rTargetSurface.DrawBitmap( aOutPos, - aOutputSize, - maContent->GetBitmap() ); - - rTargetSurface.SetLineColor(); - rTargetSurface.SetFillColor( COL_BLACK ); - rTargetSurface.SetRasterOp( ROP_0 ); - rTargetSurface.DrawPolyPolygon(PolyPolygon(aClipPoly)); // #i76339# - - rTargetSurface.SetRasterOp( ROP_XOR ); - rTargetSurface.DrawBitmap( aOutPos, - aOutputSize, - maContent->GetBitmap() ); - - rTargetSurface.Pop(); - - bSpriteRedrawn = true; - } - else -#endif - { - Region aClipRegion( aClipPoly ); - rTargetSurface.SetClipRegion( aClipRegion ); - } + Region aClipRegion( aClipPoly ); + rTargetSurface.SetClipRegion( aClipRegion ); } } |