summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@novell.com>2011-07-26 23:42:25 +0200
committerThorsten Behrens <tbehrens@novell.com>2011-07-26 23:56:14 +0200
commite563f1401a58c0d119a43e0678e1e894a9ba13eb (patch)
tree5aec1c554f4e40ea66ea8dc9123f8adcc28caf1c /canvas
parentde103dcd002087d433f166b592b4ff22ebb743cc (diff)
Removed weird VERBOSE overload in canvas
Now doing extra logging / graphical debug cues via OSL_DEBUG_LEVEL of 3. Also saves some lines in makefiles.
Diffstat (limited to 'canvas')
-rw-r--r--canvas/Library_cairocanvas.mk6
-rw-r--r--canvas/Library_canvastools.mk12
-rw-r--r--canvas/Library_directx5canvas.mk6
-rw-r--r--canvas/Library_directx9canvas.mk6
-rw-r--r--canvas/Library_nullcanvas.mk6
-rw-r--r--canvas/Library_simplecanvas.mk6
-rw-r--r--canvas/Library_vclcanvas.mk6
-rw-r--r--canvas/inc/canvas/canvastools.hxx2
-rw-r--r--canvas/inc/canvas/debug.hxx2
-rw-r--r--canvas/inc/canvas/verbosetrace.hxx2
-rw-r--r--canvas/source/directx/dx_5rm.cxx4
-rw-r--r--canvas/source/directx/dx_canvashelper_texturefill.cxx2
-rw-r--r--canvas/source/directx/dx_spritecanvashelper.cxx2
-rw-r--r--canvas/source/tools/surfaceproxy.cxx2
-rw-r--r--canvas/source/vcl/canvashelper_texturefill.cxx5
-rw-r--r--canvas/source/vcl/spritecanvashelper.cxx4
-rw-r--r--canvas/source/vcl/spritehelper.cxx7
17 files changed, 15 insertions, 65 deletions
diff --git a/canvas/Library_cairocanvas.mk b/canvas/Library_cairocanvas.mk
index f0c89a7e36a2..fda45d5f487e 100644
--- a/canvas/Library_cairocanvas.mk
+++ b/canvas/Library_cairocanvas.mk
@@ -40,12 +40,6 @@ $(eval $(call gb_Library_add_api,cairocanvas,\
udkapi \
))
-ifneq ($(strip $(VERBOSE)$(verbose)),)
-$(eval $(call gb_Library_add_defs,cairocanvas,\
- -DVERBOSE \
-))
-endif
-
ifeq ($(OS),MACOSX)
$(eval $(call gb_Library_add_cxxflags,cairocanvas,\
diff --git a/canvas/Library_canvastools.mk b/canvas/Library_canvastools.mk
index 9fb63089fd6e..53e33db05955 100644
--- a/canvas/Library_canvastools.mk
+++ b/canvas/Library_canvastools.mk
@@ -46,18 +46,6 @@ $(eval $(call gb_Library_add_defs,canvastools,\
-DCANVASTOOLS_DLLIMPLEMENTATION \
))
-ifneq ($(strip $(VERBOSE)$(verbose)),)
-$(eval $(call gb_Library_add_defs,canvastools,\
- -DVERBOSE \
-))
-endif
-
-ifneq ($(strip $(PROFILER)$(profiler)),)
-$(eval $(call gb_Library_add_defs,canvastools,\
- -DPROFILER \
-))
-endif
-
$(eval $(call gb_Library_add_linked_libs,canvastools,\
basegfx \
comphelper \
diff --git a/canvas/Library_directx5canvas.mk b/canvas/Library_directx5canvas.mk
index 53205db1cdd4..1afeb5bced6c 100644
--- a/canvas/Library_directx5canvas.mk
+++ b/canvas/Library_directx5canvas.mk
@@ -44,12 +44,6 @@ $(eval $(call gb_Library_add_defs,directx5canvas,\
-DDIRECTX_VERSION=0x0500 \
))
-ifneq ($(strip $(VERBOSE)$(verbose)),)
-$(eval $(call gb_Library_add_defs,directx5canvas,\
- -DVERBOSE \
-))
-endif
-
$(eval $(call gb_Library_add_linked_libs,directx5canvas,\
cppu \
tk \
diff --git a/canvas/Library_directx9canvas.mk b/canvas/Library_directx9canvas.mk
index a1a08c0b38e3..f91015500509 100644
--- a/canvas/Library_directx9canvas.mk
+++ b/canvas/Library_directx9canvas.mk
@@ -39,12 +39,6 @@ $(eval $(call gb_Library_add_defs,directx9canvas,\
-DDIRECTX_VERSION=0x0900 \
))
-ifneq ($(strip $(VERBOSE)$(verbose)),)
-$(eval $(call gb_Library_add_defs,directx9canvas,\
- -DVERBOSE \
-))
-endif
-
$(eval $(call gb_Library_add_linked_libs,directx9canvas,\
cppu \
tk \
diff --git a/canvas/Library_nullcanvas.mk b/canvas/Library_nullcanvas.mk
index 4dc59949064b..67ae0930fd20 100644
--- a/canvas/Library_nullcanvas.mk
+++ b/canvas/Library_nullcanvas.mk
@@ -38,12 +38,6 @@ $(eval $(call gb_Library_add_api,nullcanvas,\
udkapi \
))
-ifneq ($(strip $(VERBOSE)$(verbose)),)
-$(eval $(call gb_Library_add_defs,nullcanvas,\
- -DVERBOSE \
-))
-endif
-
$(eval $(call gb_Library_add_linked_libs,nullcanvas,\
basegfx \
canvastools \
diff --git a/canvas/Library_simplecanvas.mk b/canvas/Library_simplecanvas.mk
index b031a0a534ad..f34e514e664f 100644
--- a/canvas/Library_simplecanvas.mk
+++ b/canvas/Library_simplecanvas.mk
@@ -40,12 +40,6 @@ $(eval $(call gb_Library_add_api,simplecanvas,\
udkapi \
))
-ifneq ($(strip $(VERBOSE)$(verbose)),)
-$(eval $(call gb_Library_add_defs,simplecanvas,\
- -DVERBOSE \
-))
-endif
-
$(eval $(call gb_Library_add_linked_libs,simplecanvas,\
basegfx \
canvastools \
diff --git a/canvas/Library_vclcanvas.mk b/canvas/Library_vclcanvas.mk
index c86bea5a20ab..8363535f02b7 100644
--- a/canvas/Library_vclcanvas.mk
+++ b/canvas/Library_vclcanvas.mk
@@ -40,12 +40,6 @@ $(eval $(call gb_Library_add_api,vclcanvas,\
udkapi \
))
-ifneq ($(strip $(VERBOSE)$(verbose)),)
-$(eval $(call gb_Library_add_defs,vclcanvas,\
- -DVERBOSE \
-))
-endif
-
$(eval $(call gb_Library_add_linked_libs,vclcanvas,\
basegfx \
canvastools \
diff --git a/canvas/inc/canvas/canvastools.hxx b/canvas/inc/canvas/canvastools.hxx
index 018fdfdc33e0..9138ea4734fe 100644
--- a/canvas/inc/canvas/canvastools.hxx
+++ b/canvas/inc/canvas/canvastools.hxx
@@ -483,7 +483,7 @@ namespace canvas
( SourceLimits::is_signed && arg<TargetLimits::min()) || // underflow will happen
( arg>TargetLimits::max() ) ) // overflow will happen
{
-#if defined(VERBOSE) && defined(DBG_UTIL)
+# if OSL_DEBUG_LEVEL > 2
OSL_TRACE("numeric_cast detected data loss");
#endif
throw ::com::sun::star::uno::RuntimeException(
diff --git a/canvas/inc/canvas/debug.hxx b/canvas/inc/canvas/debug.hxx
index 62bee8e7ce38..d09f6ec6b990 100644
--- a/canvas/inc/canvas/debug.hxx
+++ b/canvas/inc/canvas/debug.hxx
@@ -39,7 +39,7 @@
::std::size_t find_unreachable_objects( bool );
-# ifdef VERBOSE
+# if OSL_DEBUG_LEVEL > 2
# include <osl/diagnose.h>
# define SHARED_PTR_LEFTOVERS(a) OSL_TRACE("%s\n%s: Unreachable objects still use %d bytes\n", \
BOOST_CURRENT_FUNCTION, a, \
diff --git a/canvas/inc/canvas/verbosetrace.hxx b/canvas/inc/canvas/verbosetrace.hxx
index 2a7fbd469066..0e830825ae41 100644
--- a/canvas/inc/canvas/verbosetrace.hxx
+++ b/canvas/inc/canvas/verbosetrace.hxx
@@ -29,7 +29,7 @@
#ifndef INCLUDED_CANVAS_VERBOSETRACE_HXX
#define INCLUDED_CANVAS_VERBOSETRACE_HXX
-#if defined(VERBOSE) && defined(DBG_UTIL)
+#if OSL_DEBUG_LEVEL > 2
/// Wrap OSL_TRACE with a verbosity switch
#define VERBOSE_TRACE OSL_TRACE
#else
diff --git a/canvas/source/directx/dx_5rm.cxx b/canvas/source/directx/dx_5rm.cxx
index 25ac0bd828b9..7766951ef536 100644
--- a/canvas/source/directx/dx_5rm.cxx
+++ b/canvas/source/directx/dx_5rm.cxx
@@ -1735,7 +1735,7 @@ namespace dxcanvas
// ignore area and offset for page flipping device
if( mbPageFlipping )
{
-#if defined(VERBOSE) && defined(DBG_UTIL)
+#if OSL_DEBUG_LEVEL > 2
renderFPSCounter();
renderMemAvailable();
#endif
@@ -1816,7 +1816,7 @@ namespace dxcanvas
*mpBackBufferSurface,
pBltFX,false ) )
{
-#if defined(VERBOSE) && defined(DBG_UTIL)
+#if OSL_DEBUG_LEVEL > 2
renderFPSCounter();
renderMemAvailable();
#endif
diff --git a/canvas/source/directx/dx_canvashelper_texturefill.cxx b/canvas/source/directx/dx_canvashelper_texturefill.cxx
index bd269a6aab66..e18a6d3ee593 100644
--- a/canvas/source/directx/dx_canvashelper_texturefill.cxx
+++ b/canvas/source/directx/dx_canvashelper_texturefill.cxx
@@ -422,7 +422,7 @@ namespace dxcanvas
rGraphics->FillPath( pGradientBrush.get(), pFillPath.get() );
}
-#if defined(VERBOSE) && defined(DBG_UTIL)
+#if OSL_DEBUG_LEVEL > 2
Gdiplus::Pen aPen( Gdiplus::Color( 255, 255, 0, 0 ),
0.0001f );
diff --git a/canvas/source/directx/dx_spritecanvashelper.cxx b/canvas/source/directx/dx_spritecanvashelper.cxx
index 30bf9040634c..f2a28aab84ed 100644
--- a/canvas/source/directx/dx_spritecanvashelper.cxx
+++ b/canvas/source/directx/dx_spritecanvashelper.cxx
@@ -113,7 +113,7 @@ namespace dxcanvas
maScrapRect(),
mbShowSpriteBounds( false )
{
-#if defined(VERBOSE) && defined(DBG_UTIL)
+#if OSL_DEBUG_LEVEL > 2
// inverse default for verbose debug mode
mbShowSpriteBounds = true;
#endif
diff --git a/canvas/source/tools/surfaceproxy.cxx b/canvas/source/tools/surfaceproxy.cxx
index 3c9479cd5ece..1da566f5baa3 100644
--- a/canvas/source/tools/surfaceproxy.cxx
+++ b/canvas/source/tools/surfaceproxy.cxx
@@ -156,7 +156,7 @@ namespace canvas
const ::basegfx::B2DPolygon& rTriangulatedPolygon(
::basegfx::triangulator::triangulate(rClipPoly));
-#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 2
// dump polygons
OSL_TRACE( "Original clip polygon: %s\n"
"Triangulated polygon: %s\n",
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index e7ffe0e41356..638b4fc00aa2 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -454,7 +454,7 @@ namespace vclcanvas
(sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
(sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
-#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 2
if( i && !(i % 10) )
rOutDev.SetFillColor( COL_RED );
#endif
@@ -705,7 +705,8 @@ namespace vclcanvas
}
#endif // complex-clipping vs. XOR-trick
-#if 0 //defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 3
+ // extra-verbosity
{
::basegfx::B2DRectangle aRect(0.0, 0.0, 1.0, 1.0);
::basegfx::B2DRectangle aTextureDeviceRect;
diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx
index ac75508809fe..4b21c012b04e 100644
--- a/canvas/source/vcl/spritecanvashelper.cxx
+++ b/canvas/source/vcl/spritecanvashelper.cxx
@@ -194,7 +194,7 @@ namespace vclcanvas
mbShowSpriteBounds( false ),
mbIsUnsafeScrolling( false )
{
-#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 2
// inverse defaults for verbose debug mode
mbShowSpriteBounds = mbShowFrameInfo = true;
#endif
@@ -353,7 +353,7 @@ namespace vclcanvas
renderMemUsage( rOutDev );
}
-#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 2
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 e4226fac1f16..cf34ce975ce4 100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -412,11 +412,8 @@ namespace vclcanvas
2,'.',NULL,' ') );
rTargetSurface.DrawText( aOutPos+Point(2,2), text );
-
-#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
- OSL_TRACE( "SpriteHelper::redraw(): sprite %X has prio %f\n",
- this, getPriority() );
-#endif
+ VERBOSE_TRACE( "SpriteHelper::redraw(): sprite %X has prio %f\n",
+ this, getPriority() );
}
}
}