Kaydet (Commit) 326777b5 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

remove VERBOSE use from canva

in preparation to kill --enable-verbose in configure.ac
convert modules that use VERBOSE-YES/NO (uppercase) env variable
to do things differently at compile time
Convert canvas to use SAL_INFO/SAL_WARN mechanism instead of its
home-grown 'verbose logging'.

Change-Id: I2898d2309d421457839e3cd7078166c6da919882
Reviewed-on: https://gerrit.libreoffice.org/17619Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
üst 3e47219e
......@@ -30,12 +30,6 @@ $(eval $(call gb_Library_add_defs,gdipluscanvas,\
-UNOMINMAX \
))
ifneq ($(strip $(VERBOSE)$(verbose)),)
$(eval $(call gb_Library_add_defs,gdipluscanvas,\
-DVERBOSE \
))
endif
$(eval $(call gb_Library_use_libraries,gdipluscanvas,\
cppu \
tk \
......
......@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
#include <tools/diagnose_ex.h>
......@@ -66,7 +64,7 @@ namespace cairocanvas
4: XWindow for creating Window (or empty for VirtualDevice)
5: SystemGraphicsData as a streamed Any
*/
VERBOSE_TRACE("Canvas created %p\n", this);
SAL_INFO("canvas.cairo","Canvas created " << this);
ENSURE_ARG_OR_THROW( maArguments.getLength() >= 6 &&
maArguments[0].getValueTypeClass() == uno::TypeClass_HYPER &&
......@@ -108,7 +106,7 @@ namespace cairocanvas
Canvas::~Canvas()
{
OSL_TRACE( "CairoCanvas destroyed" );
SAL_INFO("canvas.cairo", "CairoCanvas destroyed" );
}
void Canvas::disposeThis()
......
......@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <tools/diagnose_ex.h>
......
......@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
#include <osl/mutex.hxx>
......
......@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
#include <com/sun/star/registry/XRegistryKey.hpp>
......
......@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
#include <tools/diagnose_ex.h>
......@@ -52,7 +50,7 @@ namespace cairocanvas
void SpriteCanvas::initialize()
{
VERBOSE_TRACE("CairoSpriteCanvas created %p\n", this);
SAL_INFO("canvas.cairo", "CairoSpriteCanvas created " << this);
// #i64742# Only call initialize when not in probe mode
if( maArguments.getLength() == 0 )
......
......@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
#include <tools/diagnose_ex.h>
......
......@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
#include <osl/mutex.hxx>
......@@ -72,13 +70,13 @@ namespace cairocanvas
bool SpriteDeviceHelper::showBuffer( bool, bool )
{
OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
SAL_WARN("canvas.cairo", "showBuffer Not supposed to be called, handled by SpriteCanvas");
return false;
}
bool SpriteDeviceHelper::switchBuffer( bool, bool )
{
OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
SAL_WARN("canvas.cairo", "showBuffer Not supposed to be called, handled by SpriteCanvas");
return false;
}
......
......@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <tools/diagnose_ex.h>
#include <rtl/math.hxx>
......
......@@ -19,8 +19,6 @@
#include <math.h>
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <tools/diagnose_ex.h>
......@@ -146,7 +144,7 @@ namespace cairocanvas
if( aAdvancements.getLength() != maText.Length )
{
OSL_TRACE( "TextLayout::applyLogicalAdvancements(): mismatching number of advancements" );
SAL_WARN("canvas.cairo", "TextLayout::applyLogicalAdvancements(): mismatching number of advancements" );
throw lang::IllegalArgumentException();
}
......@@ -300,7 +298,7 @@ namespace cairocanvas
// vertical glyph rendering is not supported in cairo for now
if (aSysFontData.bVerticalCharacterType)
{
OSL_TRACE(":cairocanvas::TextLayout::isCairoRenderable(): ***************** VERTICAL CHARACTER STYLE!!! ****************");
SAL_WARN("canvas.cairo", ":cairocanvas::TextLayout::isCairoRenderable(): Vertical Character Style not supported");
return false;
}
......@@ -364,13 +362,13 @@ namespace cairocanvas
if( !isCairoRenderable(aFontData.back().first) )
{
bCairoRenderable = false;
OSL_TRACE(":cairocanvas::TextLayout::draw(S,O,p,v,r): VCL FALLBACK %s%s%s%s - %s",
maLogicalAdvancements.getLength() ? "ADV " : "",
aFontData.back().first.bAntialias ? "AA " : "",
aFontData.back().first.bFakeBold ? "FB " : "",
aFontData.back().first.bFakeItalic ? "FI " : "",
OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ),
RTL_TEXTENCODING_UTF8 ).getStr());
SAL_INFO("canvas.cairo", ":cairocanvas::TextLayout::draw(S,O,p,v,r): VCL FALLBACK " <<
(maLogicalAdvancements.getLength() ? "ADV " : "") <<
(aFontData.back().first.bAntialias ? "AA " : "") <<
(aFontData.back().first.bFakeBold ? "FB " : "") <<
(aFontData.back().first.bFakeItalic ? "FI " : "") <<
" - " <<
maText.Text.copy( maText.StartPosition, maText.Length));
break;
}
}
......@@ -519,7 +517,7 @@ namespace cairocanvas
}
cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size());
}
OSL_TRACE(":cairocanvas::TextLayout::draw(S,O,p,v,r): FAKEBOLD - dx:%d", (int) bold_dx);
SAL_INFO("canvas.cairo",":cairocanvas::TextLayout::draw(S,O,p,v,r): FAKEBOLD - dx:" << (int) bold_dx);
}
cairo_font_face_destroy(font_face);
......
......@@ -35,8 +35,6 @@
#include <vcl/syschild.hxx>
#include <vcl/window.hxx>
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <tools/diagnose_ex.h>
#include <canvas/elapsedtime.hxx>
......@@ -1159,7 +1157,7 @@ namespace dxcanvas
}
default:
OSL_FAIL("DXRenderModule::pushVertex(): unexpected primitive type");
SAL_WARN("canvas.directx", "DXRenderModule::pushVertex(): unexpected primitive type");
break;
}
}
......
......@@ -19,8 +19,6 @@
#include <ctype.h>
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
#include <tools/diagnose_ex.h>
......@@ -82,7 +80,7 @@ namespace dxcanvas
if( maArguments.getLength() == 0 )
return;
VERBOSE_TRACE( "Canvas::initialize called" );
SAL_INFO("canvas.directx", "Canvas::initialize called" );
// At index 1, we expect a HWND handle here, containing a
// pointer to a valid window, on which to output
......@@ -143,7 +141,7 @@ namespace dxcanvas
if( maArguments.getLength() == 0 )
return;
VERBOSE_TRACE( "BitmapCanvas::initialize called" );
SAL_INFO("canvas.directx", "BitmapCanvas::initialize called" );
// At index 1, we expect a HWND handle here, containing a
// pointer to a valid window, on which to output
......
......@@ -19,8 +19,6 @@
#include <ctype.h>
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <tools/diagnose_ex.h>
......
......@@ -21,8 +21,6 @@
#include <ctype.h>
#include <vcl/window.hxx>
#include <vcl/canvastools.hxx>
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
#include <tools/diagnose_ex.h>
......
......@@ -21,8 +21,6 @@
#include <ctype.h>
#include <basegfx/numeric/ftools.hxx>
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <tools/diagnose_ex.h>
#include <com/sun/star/lang/XServiceInfo.hpp>
......
......@@ -19,8 +19,6 @@
#include <ctype.h>
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <tools/diagnose_ex.h>
#include <canvas/canvastools.hxx>
......@@ -68,7 +66,7 @@ namespace dxcanvas
if( maArguments.getLength() == 0 )
return;
VERBOSE_TRACE( "SpriteCanvas::initialize called" );
SAL_INFO("canvas.directx", "SpriteCanvas::initialize called" );
/* aArguments:
0: ptr to creating instance (Window or VirtualDevice)
......
......@@ -18,8 +18,6 @@
*/
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
#include <tools/diagnose_ex.h>
......
......@@ -19,8 +19,6 @@
#include <ctype.h>
#include <vcl/window.hxx>
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
#include <tools/diagnose_ex.h>
......@@ -164,13 +162,13 @@ namespace dxcanvas
sal_Bool SpriteDeviceHelper::showBuffer( bool, sal_Bool )
{
OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
SAL_WARN("canvas.directx", "Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
sal_Bool SpriteDeviceHelper::switchBuffer( bool, sal_Bool )
{
OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
SAL_WARN("canvas.directx", "Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
......
......@@ -18,8 +18,6 @@
*/
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <tools/diagnose_ex.h>
#include <rtl/math.hxx>
......@@ -123,9 +121,8 @@ namespace dxcanvas
// background buffer.
// log output pos in device pixel
VERBOSE_TRACE( "SpriteHelper::redraw(): output pos is (%f, %f)",
rPos.getX(),
rPos.getY() );
SAL_INFO("canva.directx", "SpriteHelper::redraw(): output pos is (" <<
rPos.getX() << "," << rPos.getY() << ")" );
const double fAlpha( getAlpha() );
const ::basegfx::B2DVector& rSize( getSizePixel() );
......
......@@ -19,8 +19,6 @@
#include <ctype.h>
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
......@@ -93,7 +91,7 @@ namespace dxcanvas
if( aAdvancements.getLength() != maText.Length )
{
OSL_TRACE( "TextLayout::applyLogicalAdvancements(): mismatching number of advancements" );
SAL_WARN("canvas.directx", "TextLayout::applyLogicalAdvancements(): mismatching number of advancements" );
throw lang::IllegalArgumentException();
}
......
......@@ -18,18 +18,16 @@
*/
#include <vcl/canvastools.hxx>
#include <tools/diagnose_ex.h>
#include <vcl/canvastools.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/bmpacc.hxx>
#include <tools/diagnose_ex.h>
#include "dx_impltools.hxx"
#include <basegfx/numeric/ftools.hxx>
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <basegfx/numeric/ftools.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/rendering/XIntegerBitmap.hpp>
......
......@@ -11,11 +11,7 @@
#include "ogl_canvastools.hxx"
#include "ogl_tools.hxx"
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <canvas/verifyinput.hxx>
#include <tools/diagnose_ex.h>
#include <canvas/canvastools.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
......@@ -25,6 +21,7 @@
#include <basegfx/polygon/b2dpolygontriangulator.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <tools/diagnose_ex.h>
#include <GL/glew.h>
using namespace ::com::sun::star;
......
......@@ -9,10 +9,6 @@
#include "ogl_spritecanvas.hxx"
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <tools/diagnose_ex.h>
#include <osl/mutex.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
......@@ -25,6 +21,8 @@
#include <cppuhelper/implementationentry.hxx>
#include <comphelper/servicedecl.hxx>
#include <tools/diagnose_ex.h>
#include "ogl_canvascustomsprite.hxx"
#define SPRITECANVAS_SERVICE_NAME "com.sun.star.rendering.SpriteCanvas.OGL"
......@@ -48,7 +46,7 @@ namespace oglcanvas
if( maArguments.getLength() == 0 )
return;
VERBOSE_TRACE( "SpriteCanvas::initialize called" );
SAL_INFO("canvas.ogl", "SpriteCanvas::initialize called" );
/* aArguments:
0: ptr to creating instance (Window or VirtualDevice)
......
......@@ -14,7 +14,6 @@
#include "ogl_canvascustomsprite.hxx"
#include "ogl_texturecache.hxx"
#include <canvas/verbosetrace.hxx>
#include <basegfx/tools/canvastools.hxx>
#include <basegfx/tools/unopolypolygon.hxx>
......
......@@ -9,13 +9,9 @@
#include "ogl_textlayout.hxx"
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <tools/diagnose_ex.h>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
......
......@@ -18,10 +18,8 @@
*/
#include <canvas/debug.hxx>
#include <tools/diagnose_ex.h>
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
#include <tools/diagnose_ex.h>
#include <rtl/math.hxx>
......
......@@ -18,7 +18,6 @@
*/
#include <canvas/debug.hxx>
#include <tools/diagnose_ex.h>
#include <canvas/spriteredrawmanager.hxx>
......
......@@ -19,7 +19,6 @@
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
#include <tools/diagnose_ex.h>
......@@ -88,7 +87,7 @@ namespace vclcanvas
*/
SolarMutexGuard aGuard;
VERBOSE_TRACE( "VCLCanvas::initialize called" );
SAL_INFO("canvas.vcl", "VCLCanvas::initialize called" );
ENSURE_ARG_OR_THROW( maArguments.getLength() >= 6 &&
maArguments[0].getValueTypeClass() == uno::TypeClass_HYPER,
......@@ -117,7 +116,7 @@ namespace vclcanvas
Canvas::~Canvas()
{
OSL_TRACE( "Canvas destroyed" );
SAL_INFO("canvas.vcl", "VCLCanvas destroyed" );
}
void Canvas::disposeThis()
......
......@@ -20,7 +20,6 @@
#include <canvas/debug.hxx>
#include <tools/diagnose_ex.h>
#include <canvas/verbosetrace.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <rtl/math.hxx>
......
......@@ -19,7 +19,6 @@
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
#include <com/sun/star/registry/XRegistryKey.hpp>
......
......@@ -20,7 +20,6 @@
#include <canvas/debug.hxx>
#include <tools/diagnose_ex.h>
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
#include <com/sun/star/registry/XRegistryKey.hpp>
......@@ -79,7 +78,7 @@ namespace vclcanvas
boost::ref(maCanvasHelper),
_1)));
VERBOSE_TRACE( "VCLSpriteCanvas::initialize called" );
SAL_INFO("canvas.vcl", "VCLSpriteCanvas::initialize called" );
ENSURE_ARG_OR_THROW( maArguments.getLength() >= 1,
"VCLSpriteCanvas::initialize: wrong number of arguments" );
......
......@@ -20,7 +20,6 @@
#include <canvas/debug.hxx>
#include <tools/diagnose_ex.h>
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
#include <vcl/canvastools.hxx>
......
......@@ -20,7 +20,6 @@
#include <canvas/debug.hxx>
#include <tools/diagnose_ex.h>
#include <canvas/verbosetrace.hxx>
#include <rtl/math.hxx>
......@@ -97,9 +96,8 @@ namespace vclcanvas
}
// log output pos in device pixel
VERBOSE_TRACE( "SpriteHelper::redraw(): output pos is (%f, %f)",
rPos.getX(),
rPos.getY() );
SAL_INFO("canva.vcl", "SpriteHelper::redraw(): output pos is (" <<
rPos.getX() << "," << rPos.getY() << ")");
const double fAlpha( getAlpha() );
......@@ -332,9 +330,8 @@ namespace vclcanvas
2,'.',NULL,' ') );
rTargetSurface.DrawText( aOutPos+Point(2,2), text );
SAL_INFO(
"canvas.level2",
"sprite " << this << " has prio " << getPriority());
SAL_INFO( "canvas.vcl",
"sprite " << this << " has prio " << getPriority());
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment