diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-03-25 09:22:38 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-03-25 09:26:15 +0200 |
commit | 6d12b76b2c411a7ea00b44d6ce131f79a20a7319 (patch) | |
tree | f49f90b87203c90e69f7233ae27d32453917f823 /basebmp/source/debug.cxx | |
parent | 1e50f7892705c64db0ffec06b651cd280e9a7f8f (diff) |
Add some debugging printout
Change-Id: Iea0decde41be8b9325b19651433f1b3b79f851a9
Diffstat (limited to 'basebmp/source/debug.cxx')
-rw-r--r-- | basebmp/source/debug.cxx | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/basebmp/source/debug.cxx b/basebmp/source/debug.cxx index 8ea42de5b8b4..4fe26f84af9a 100644 --- a/basebmp/source/debug.cxx +++ b/basebmp/source/debug.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if OSL_DEBUG_LEVEL > 2 - #include <osl/diagnose.h> #include <basegfx/point/b2ipoint.hxx> @@ -33,12 +31,14 @@ namespace basebmp { - namespace + namespace Format { - static const char* getFormatString( sal_Int32 nScanlineFormat ) + const char* formatName( sal_Int32 nScanlineFormat ) { switch( nScanlineFormat ) { + case Format::NONE: + return "NONE"; case Format::ONE_BIT_MSB_GREY: return "ONE_BIT_MSB_GREY"; case Format::ONE_BIT_LSB_GREY: @@ -65,14 +65,22 @@ namespace basebmp return "SIXTEEN_BIT_MSB_TC_MASK"; case Format::TWENTYFOUR_BIT_TC_MASK: return "TWENTYFOUR_BIT_TC_MASK"; - case Format::THIRTYTWO_BIT_TC_MASK: - return "THIRTYTWO_BIT_TC_MASK"; + case Format::THIRTYTWO_BIT_TC_MASK_BGRA: + return "THIRTYTWO_BIT_TC_MASK_BGRA"; + case Format::THIRTYTWO_BIT_TC_MASK_ARGB: + return "THIRTYTWO_BIT_TC_MASK_ARGB"; + case Format::THIRTYTWO_BIT_TC_MASK_ABGR: + return "THIRTYTWO_BIT_TC_MASK_ABGR"; + case Format::THIRTYTWO_BIT_TC_MASK_RGBA: + return "THIRTYTWO_BIT_TC_MASK_RGBA"; default: return "<unknown>"; } } } +#if OSL_DEBUG_LEVEL > 2 + SAL_DLLPUBLIC_EXPORT void debugDump( const BitmapDeviceSharedPtr& rDevice, std::ostream& rOutputStream ) { @@ -85,7 +93,7 @@ namespace basebmp << "/* Width = " << aSize.getX() << " */" << std::endl << "/* Height = " << aSize.getY() << " */" << std::endl << "/* TopDown = " << bTopDown << " */" << std::endl - << "/* Format = " << getFormatString(nScanlineFormat) << " */" << std::endl + << "/* Format = " << formatName(nScanlineFormat) << " */" << std::endl << "/* (dumped entries are already mapped RGBA color values) */" << std::endl << std::endl; @@ -97,8 +105,9 @@ namespace basebmp rOutputStream << std::endl; } } -} #endif // OSL_DEBUG_LEVEL > 2 +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |