diff options
-rw-r--r-- | canvas/source/vcl/spritecanvashelper.cxx | 8 | ||||
-rw-r--r-- | canvas/source/vcl/spritehelper.cxx | 32 |
2 files changed, 33 insertions, 7 deletions
diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx index 16025642c2d1..06827fe84701 100644 --- a/canvas/source/vcl/spritecanvashelper.cxx +++ b/canvas/source/vcl/spritecanvashelper.cxx @@ -4,9 +4,9 @@ * * $RCSfile: spritecanvashelper.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: kz $ $Date: 2005-11-02 13:04:38 $ + * last change: $Author: obo $ $Date: 2005-11-17 16:08:27 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -195,7 +195,7 @@ namespace vclcanvas mbShowSpriteBounds( false ), mbIsUnsafeScrolling( false ) { -#if defined(VERBOSE) && defined(DBG_UTIL) +#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0 // inverse defaults for verbose debug mode mbShowSpriteBounds = mbShowFrameInfo = true; #endif @@ -329,7 +329,7 @@ namespace vclcanvas renderMemUsage( rOutDev ); } -#if defined(VERBOSE) && defined(DBG_UTIL) +#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0 static ::canvas::tools::ElapsedTime aElapsedTime; // log time immediately after surface flip diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx index 2acf37f2c0f3..fc8b07d854f3 100644 --- a/canvas/source/vcl/spritehelper.cxx +++ b/canvas/source/vcl/spritehelper.cxx @@ -4,9 +4,9 @@ * * $RCSfile: spritehelper.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: kz $ $Date: 2005-11-02 13:05:00 $ + * last change: $Author: obo $ $Date: 2005-11-17 16:08:40 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -266,6 +266,31 @@ namespace vclcanvas // the final sprite output position. aClipPoly.transform( aTransform ); +#ifndef WNT + // 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 @@ -279,7 +304,8 @@ namespace vclcanvas // as a matter of fact, this fast path only // performs well for X11 - under Windows, the // clip via SetTriangleClipRegion is faster. - if( bBufferedUpdate && + if( bAtLeastOnePolygon && + bBufferedUpdate && ::rtl::math::approxEqual(fAlpha, 1.0) && !maContent->IsTransparent() ) { |