[Libreoffice-commits] .: 2 commits - canvas/inc canvas/Library_cairocanvas.mk canvas/Library_canvastools.mk canvas/Library_directx5canvas.mk canvas/Library_directx9canvas.mk canvas/Library_nullcanvas.mk canvas/Library_simplecanvas.mk canvas/Library_vclcanvas.mk canvas/source
Thorsten Behrens
thorsten at kemper.freedesktop.org
Tue Jul 26 15:10:32 PDT 2011
canvas/Library_cairocanvas.mk | 6 -----
canvas/Library_canvastools.mk | 12 -----------
canvas/Library_directx5canvas.mk | 6 -----
canvas/Library_directx9canvas.mk | 6 -----
canvas/Library_nullcanvas.mk | 6 -----
canvas/Library_simplecanvas.mk | 6 -----
canvas/Library_vclcanvas.mk | 19 ------------------
canvas/inc/canvas/canvastools.hxx | 2 -
canvas/inc/canvas/debug.hxx | 2 -
canvas/inc/canvas/verbosetrace.hxx | 2 -
canvas/source/directx/dx_5rm.cxx | 4 +--
canvas/source/directx/dx_canvashelper_texturefill.cxx | 2 -
canvas/source/directx/dx_spritecanvashelper.cxx | 2 -
canvas/source/tools/surfaceproxy.cxx | 2 -
canvas/source/vcl/canvashelper_texturefill.cxx | 5 ++--
canvas/source/vcl/spritecanvashelper.cxx | 4 +--
canvas/source/vcl/spritehelper.cxx | 7 +-----
17 files changed, 16 insertions(+), 77 deletions(-)
New commits:
commit 2aa674dbc277d188fcec14bc8d9605ccb5449934
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Tue Jul 26 23:42:25 2011 +0200
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.
diff --git a/canvas/Library_cairocanvas.mk b/canvas/Library_cairocanvas.mk
index f0c89a7..fda45d5 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 9fb6308..53e33db 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 53205db..1afeb5b 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 a1a08c0..f910155 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 4dc5994..67ae093 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 b031a0a..f34e514 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 c86bea5..8363535 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 6e67b79..6113260 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 5e81c62..76a3f3c 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 aadfa0a..3a0d701 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 061914b..d9f62e9 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 6ce0498..59e0526 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 708f98e..2503b8c 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 a73246c..48d233b 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 d493059..538b1e6 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 e373255..704d656 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 e94f95e..b9dddf2 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() );
}
}
}
commit b18c27e29b033ea2aa84dc583d3e5d66684bf15e
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Tue Jul 26 23:41:18 2011 +0200
Removed special-casing for SunStudio brokenness
No point in cluttering makefile with workaround for unsupported
compiler.
diff --git a/canvas/Library_vclcanvas.mk b/canvas/Library_vclcanvas.mk
index 7141552..c86bea5 100644
--- a/canvas/Library_vclcanvas.mk
+++ b/canvas/Library_vclcanvas.mk
@@ -79,19 +79,8 @@ $(eval $(call gb_Library_add_exception_objects,vclcanvas,\
canvas/source/vcl/spritedevicehelper \
canvas/source/vcl/spritehelper \
canvas/source/vcl/textlayout \
- canvas/source/vcl/windowoutdevholder \
-))
-
-# Solaris Sparc with Sun Compiler: noopt
-ifneq ($(strip($OS)),SOLARIS)
-$(eval $(call gb_Library_add_exception_objects,vclcanvas,\
canvas/source/vcl/canvashelper_texturefill \
+ canvas/source/vcl/windowoutdevholder \
))
-else
-$(eval $(call gb_Library_add_cxxobjects,vclcanvas,\
- canvas/source/vcl/canvashelper_texturefill \
- , $(gb_COMPILERNOOPTFLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS) \
-))
-endif
# vim: set noet sw=4 ts=4:
More information about the Libreoffice-commits
mailing list