Kaydet (Commit) f5eae095 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Mention early exits in the verbose debugging log

Change-Id: I68e5aa92cb6ccff8b8d077c311d2ebc3f4676ae7
üst 6a8d7ddf
...@@ -58,10 +58,13 @@ extern int DBG_DRAW_ROUNDS, DBG_DRAW_COUNTER, DBG_DRAW_DEPTH; ...@@ -58,10 +58,13 @@ extern int DBG_DRAW_ROUNDS, DBG_DRAW_COUNTER, DBG_DRAW_DEPTH;
SAL_DEBUG("<=== " << s << " " << DBG_DRAW_COUNTER); \ SAL_DEBUG("<=== " << s << " " << DBG_DRAW_COUNTER); \
} while (false) } while (false)
#define DBG_DRAW_OPERATION_EXIT_EARLY(s) DBG_DRAW_OPERATION_EXIT(s << " exit early " << __LINE__)
#else #else
#define DBG_DRAW_OPERATION(s,v) /* empty */ #define DBG_DRAW_OPERATION(s,v) /* empty */
#define DBG_DRAW_OPERATION_EXIT(s) /* empty */ #define DBG_DRAW_OPERATION_EXIT(s) /* empty */
#define DBG_DRAW_OPERATION_EXIT_EARLY(s) /* empty */
#endif #endif
...@@ -569,7 +572,7 @@ bool AquaSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, ...@@ -569,7 +572,7 @@ bool AquaSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
// An image mask can't have a depth > 8 bits (should be 1 to 8 bits) // An image mask can't have a depth > 8 bits (should be 1 to 8 bits)
if( rAlphaBmp.GetBitCount() > 8 ) if( rAlphaBmp.GetBitCount() > 8 )
{ {
DBG_DRAW_OPERATION_EXIT("drawAlphaBitmap"); DBG_DRAW_OPERATION_EXIT_EARLY("drawAlphaBitmap");
return false; return false;
} }
...@@ -577,7 +580,7 @@ bool AquaSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, ...@@ -577,7 +580,7 @@ bool AquaSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
// horizontal/vertical mirroring not implemented yet // horizontal/vertical mirroring not implemented yet
if( rTR.mnDestWidth < 0 || rTR.mnDestHeight < 0 ) if( rTR.mnDestWidth < 0 || rTR.mnDestHeight < 0 )
{ {
DBG_DRAW_OPERATION_EXIT("drawAlphaBitmap"); DBG_DRAW_OPERATION_EXIT_EARLY("drawAlphaBitmap");
return false; return false;
} }
...@@ -588,7 +591,7 @@ bool AquaSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, ...@@ -588,7 +591,7 @@ bool AquaSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
rTR.mnSrcHeight ); rTR.mnSrcHeight );
if( !xMaskedImage ) if( !xMaskedImage )
{ {
DBG_DRAW_OPERATION_EXIT("drawAlphaBitmap"); DBG_DRAW_OPERATION_EXIT_EARLY("drawAlphaBitmap");
return false; return false;
} }
...@@ -615,7 +618,7 @@ bool AquaSalGraphics::drawTransformedBitmap( ...@@ -615,7 +618,7 @@ bool AquaSalGraphics::drawTransformedBitmap(
if( !CheckContext() ) if( !CheckContext() )
{ {
DBG_DRAW_OPERATION_EXIT("drawTransformedBitmap"); DBG_DRAW_OPERATION_EXIT_EARLY("drawTransformedBitmap");
return true; return true;
} }
...@@ -630,7 +633,7 @@ bool AquaSalGraphics::drawTransformedBitmap( ...@@ -630,7 +633,7 @@ bool AquaSalGraphics::drawTransformedBitmap(
xImage = rSrcSalBmp.CreateWithMask( *pMaskSalBmp, 0, 0, (int)aSize.Width(), (int)aSize.Height() ); xImage = rSrcSalBmp.CreateWithMask( *pMaskSalBmp, 0, 0, (int)aSize.Width(), (int)aSize.Height() );
if( !xImage ) if( !xImage )
{ {
DBG_DRAW_OPERATION_EXIT("drawTransformedBitmap"); DBG_DRAW_OPERATION_EXIT_EARLY("drawTransformedBitmap");
return false; return false;
} }
...@@ -672,7 +675,7 @@ bool AquaSalGraphics::drawAlphaRect( long nX, long nY, long nWidth, ...@@ -672,7 +675,7 @@ bool AquaSalGraphics::drawAlphaRect( long nX, long nY, long nWidth,
if( !CheckContext() ) if( !CheckContext() )
{ {
DBG_DRAW_OPERATION_EXIT("drawAlphaRect"); DBG_DRAW_OPERATION_EXIT_EARLY("drawAlphaRect");
return true; return true;
} }
...@@ -711,7 +714,7 @@ void AquaSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rS ...@@ -711,7 +714,7 @@ void AquaSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rS
if( !CheckContext() ) if( !CheckContext() )
{ {
DBG_DRAW_OPERATION_EXIT("drawBitmap"); DBG_DRAW_OPERATION_EXIT_EARLY("drawBitmap");
return; return;
} }
...@@ -720,7 +723,7 @@ void AquaSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rS ...@@ -720,7 +723,7 @@ void AquaSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rS
(int)rPosAry.mnSrcWidth, (int)rPosAry.mnSrcHeight ); (int)rPosAry.mnSrcWidth, (int)rPosAry.mnSrcHeight );
if( !xImage ) if( !xImage )
{ {
DBG_DRAW_OPERATION_EXIT("drawBitmap"); DBG_DRAW_OPERATION_EXIT_EARLY("drawBitmap");
return; return;
} }
...@@ -747,7 +750,7 @@ void AquaSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rS ...@@ -747,7 +750,7 @@ void AquaSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rS
if( !CheckContext() ) if( !CheckContext() )
{ {
DBG_DRAW_OPERATION_EXIT("drawBitmap"); DBG_DRAW_OPERATION_EXIT_EARLY("drawBitmap");
return; return;
} }
...@@ -757,7 +760,7 @@ void AquaSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rS ...@@ -757,7 +760,7 @@ void AquaSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rS
rPosAry.mnSrcWidth, rPosAry.mnSrcHeight ) ); rPosAry.mnSrcWidth, rPosAry.mnSrcHeight ) );
if( !xMaskedImage ) if( !xMaskedImage )
{ {
DBG_DRAW_OPERATION_EXIT("drawBitmap"); DBG_DRAW_OPERATION_EXIT_EARLY("drawBitmap");
return; return;
} }
...@@ -832,13 +835,13 @@ void AquaSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) ...@@ -832,13 +835,13 @@ void AquaSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 )
// #i109453# platform independent code expects at least one pixel to be drawn // #i109453# platform independent code expects at least one pixel to be drawn
drawPixel( nX1, nY1 ); drawPixel( nX1, nY1 );
DBG_DRAW_OPERATION_EXIT("drawLine"); DBG_DRAW_OPERATION_EXIT_EARLY("drawLine");
return; return;
} }
if( !CheckContext() ) if( !CheckContext() )
{ {
DBG_DRAW_OPERATION_EXIT("drawLine"); DBG_DRAW_OPERATION_EXIT_EARLY("drawLine");
return; return;
} }
...@@ -864,7 +867,7 @@ void AquaSalGraphics::drawMask( const SalTwoRect& rPosAry, const SalBitmap& rSal ...@@ -864,7 +867,7 @@ void AquaSalGraphics::drawMask( const SalTwoRect& rPosAry, const SalBitmap& rSal
if( !CheckContext() ) if( !CheckContext() )
{ {
DBG_DRAW_OPERATION_EXIT("drawMask"); DBG_DRAW_OPERATION_EXIT_EARLY("drawMask");
return; return;
} }
...@@ -874,7 +877,7 @@ void AquaSalGraphics::drawMask( const SalTwoRect& rPosAry, const SalBitmap& rSal ...@@ -874,7 +877,7 @@ void AquaSalGraphics::drawMask( const SalTwoRect& rPosAry, const SalBitmap& rSal
nMaskColor ); nMaskColor );
if( !xImage ) if( !xImage )
{ {
DBG_DRAW_OPERATION_EXIT("drawMask"); DBG_DRAW_OPERATION_EXIT_EARLY("drawMask");
return; return;
} }
...@@ -913,21 +916,21 @@ bool AquaSalGraphics::drawPolyLine( ...@@ -913,21 +916,21 @@ bool AquaSalGraphics::drawPolyLine(
const int nPointCount = rPolyLine.count(); const int nPointCount = rPolyLine.count();
if( nPointCount <= 0 ) if( nPointCount <= 0 )
{ {
DBG_DRAW_OPERATION_EXIT("drawPolyLine"); DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyLine");
return true; return true;
} }
// reject requests that cannot be handled yet // reject requests that cannot be handled yet
if( rLineWidths.getX() != rLineWidths.getY() ) if( rLineWidths.getX() != rLineWidths.getY() )
{ {
DBG_DRAW_OPERATION_EXIT("drawPolyLine"); DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyLine");
return false; return false;
} }
#ifdef IOS #ifdef IOS
if( !CheckContext() ) if( !CheckContext() )
{ {
DBG_DRAW_OPERATION_EXIT("drawPolyLine"); DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyLine");
return false; return false;
} }
#endif #endif
...@@ -938,7 +941,7 @@ bool AquaSalGraphics::drawPolyLine( ...@@ -938,7 +941,7 @@ bool AquaSalGraphics::drawPolyLine(
if( (basegfx::B2DLINEJOIN_NONE == eLineJoin) && if( (basegfx::B2DLINEJOIN_NONE == eLineJoin) &&
(rLineWidths.getX() > 1.3) ) (rLineWidths.getX() > 1.3) )
{ {
DBG_DRAW_OPERATION_EXIT("drawPolyLine"); DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyLine");
return false; return false;
} }
...@@ -1029,14 +1032,14 @@ bool AquaSalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPol ...@@ -1029,14 +1032,14 @@ bool AquaSalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPol
const int nPolyCount = rPolyPoly.count(); const int nPolyCount = rPolyPoly.count();
if( nPolyCount <= 0 ) if( nPolyCount <= 0 )
{ {
DBG_DRAW_OPERATION_EXIT("drawPolyPolygon"); DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyPolygon");
return true; return true;
} }
// ignore invisible polygons // ignore invisible polygons
if( (fTransparency >= 1.0) || (fTransparency < 0) ) if( (fTransparency >= 1.0) || (fTransparency < 0) )
{ {
DBG_DRAW_OPERATION_EXIT("drawPolyPolygon"); DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyPolygon");
return true; return true;
} }
...@@ -1073,7 +1076,7 @@ bool AquaSalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPol ...@@ -1073,7 +1076,7 @@ bool AquaSalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPol
SAL_WARN( "vcl.quartz", "Neither pen nor brush visible" ); SAL_WARN( "vcl.quartz", "Neither pen nor brush visible" );
CG_TRACE( "CGPathRelease(" << xPath << ")" ); CG_TRACE( "CGPathRelease(" << xPath << ")" );
CGPathRelease( xPath ); CGPathRelease( xPath );
DBG_DRAW_OPERATION_EXIT("drawPolyPolygon"); DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyPolygon");
return true; return true;
} }
...@@ -1111,13 +1114,13 @@ void AquaSalGraphics::drawPolyPolygon( sal_uInt32 nPolyCount, const sal_uInt32 * ...@@ -1111,13 +1114,13 @@ void AquaSalGraphics::drawPolyPolygon( sal_uInt32 nPolyCount, const sal_uInt32 *
if( nPolyCount <= 0 ) if( nPolyCount <= 0 )
{ {
DBG_DRAW_OPERATION_EXIT("drawPolyPolygon"); DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyPolygon");
return; return;
} }
if( !CheckContext() ) if( !CheckContext() )
{ {
DBG_DRAW_OPERATION_EXIT("drawPolyPolygon"); DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyPolygon");
return; return;
} }
...@@ -1165,7 +1168,7 @@ void AquaSalGraphics::drawPolyPolygon( sal_uInt32 nPolyCount, const sal_uInt32 * ...@@ -1165,7 +1168,7 @@ void AquaSalGraphics::drawPolyPolygon( sal_uInt32 nPolyCount, const sal_uInt32 *
else else
{ {
SAL_WARN( "vcl.quartz", "Neither pen nor brush visible" ); SAL_WARN( "vcl.quartz", "Neither pen nor brush visible" );
DBG_DRAW_OPERATION_EXIT("drawPolyPolygon"); DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyPolygon");
return; return;
} }
...@@ -1238,13 +1241,13 @@ void AquaSalGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint *pPtAry ) ...@@ -1238,13 +1241,13 @@ void AquaSalGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint *pPtAry )
if( nPoints <= 1 ) if( nPoints <= 1 )
{ {
DBG_DRAW_OPERATION_EXIT("drawPolygon"); DBG_DRAW_OPERATION_EXIT_EARLY("drawPolygon");
return; return;
} }
if( !CheckContext() ) if( !CheckContext() )
{ {
DBG_DRAW_OPERATION_EXIT("drawPolygon"); DBG_DRAW_OPERATION_EXIT_EARLY("drawPolygon");
return; return;
} }
...@@ -1325,7 +1328,7 @@ void AquaSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight ) ...@@ -1325,7 +1328,7 @@ void AquaSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight )
if( !CheckContext() ) if( !CheckContext() )
{ {
DBG_DRAW_OPERATION_EXIT("drawRect"); DBG_DRAW_OPERATION_EXIT_EARLY("drawRect");
return; return;
} }
...@@ -1359,13 +1362,13 @@ void AquaSalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry ) ...@@ -1359,13 +1362,13 @@ void AquaSalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry )
if( nPoints < 1 ) if( nPoints < 1 )
{ {
DBG_DRAW_OPERATION_EXIT("drawPolyLine"); DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyLine");
return; return;
} }
if( !CheckContext() ) if( !CheckContext() )
{ {
DBG_DRAW_OPERATION_EXIT("drawPolyLine"); DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyLine");
return; return;
} }
......
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