diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-04-23 19:06:17 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-04-24 03:22:06 +1000 |
commit | 2a591848d41b4ec176a74a7f38ca0953d2ca30e7 (patch) | |
tree | e3eb4e7296c46c13126a086e9ec3481717f10460 /vcl | |
parent | 2bf2bc2c7f257a818f3f723780690450f1a22c50 (diff) |
Remove unnecessary OUTDEV_INIT() macro in VCL's outdev.hxx
Change-Id: I0eba1f88f607ba1faf40d8507bb184bdc88085be
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/outdev/bitmap.cxx | 26 | ||||
-rw-r--r-- | vcl/source/outdev/mask.cxx | 13 | ||||
-rw-r--r-- | vcl/source/outdev/outdev.cxx | 39 |
3 files changed, 72 insertions, 6 deletions
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 056af7ec2ef2..faab91e07666 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -121,7 +121,18 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize, } } - OUTDEV_INIT(); + if ( !IsDeviceOutputNecessary() ) + return; + + if ( !mpGraphics ) + if ( !AcquireGraphics() ) + return; + + if ( mbInitClipRegion ) + ImplInitClipRegion(); + + if ( mbOutputClipped ) + return; if( !aBmp.IsEmpty() ) { @@ -346,7 +357,18 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, } } - OUTDEV_INIT(); + if ( !IsDeviceOutputNecessary() ) + return; + + if ( !mpGraphics ) + if ( !AcquireGraphics() ) + return; + + if ( mbInitClipRegion ) + ImplInitClipRegion(); + + if ( mbOutputClipped ) + return; DrawDeviceBitmap( rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel, aBmpEx ); } diff --git a/vcl/source/outdev/mask.cxx b/vcl/source/outdev/mask.cxx index 4888c03e8743..39af4ba8790e 100644 --- a/vcl/source/outdev/mask.cxx +++ b/vcl/source/outdev/mask.cxx @@ -94,7 +94,18 @@ void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize, } } - OUTDEV_INIT(); + if ( !IsDeviceOutputNecessary() ) + return; + + if ( !mpGraphics ) + if ( !AcquireGraphics() ) + return; + + if ( mbInitClipRegion ) + ImplInitClipRegion(); + + if ( mbOutputClipped ) + return; ApplyMask( rBitmap, rMaskColor, rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel ); diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index 7b8142024f32..5eedc982f194 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -566,7 +566,18 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, mpMetaFile->AddAction( new MetaBmpScaleAction( rDestPt, rDestSize, aBmp ) ); } - OUTDEV_INIT(); + if ( !IsDeviceOutputNecessary() ) + return; + + if ( !mpGraphics ) + if ( !AcquireGraphics() ) + return; + + if ( mbInitClipRegion ) + ImplInitClipRegion(); + + if ( mbOutputClipped ) + return; SalTwoRect aPosAry; aPosAry.mnSrcWidth = ImplLogicWidthToDevicePixel( rSrcSize.Width() ); @@ -613,7 +624,18 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, mpMetaFile->AddAction( new MetaBmpScaleAction( rDestPt, rDestSize, aBmp ) ); } - OUTDEV_INIT(); + if ( !IsDeviceOutputNecessary() ) + return; + + if ( !mpGraphics ) + if ( !AcquireGraphics() ) + return; + + if ( mbInitClipRegion ) + ImplInitClipRegion(); + + if ( mbOutputClipped ) + return; SalTwoRect aPosAry; aPosAry.mnSrcX = rOutDev.ImplLogicXToDevicePixel( rSrcPt.X() ); @@ -665,7 +687,18 @@ void OutputDevice::CopyArea( const Point& rDestPt, RasterOp eOldRop = GetRasterOp(); SetRasterOp( ROP_OVERPAINT ); - OUTDEV_INIT(); + if ( !IsDeviceOutputNecessary() ) + return; + + if ( !mpGraphics ) + if ( !AcquireGraphics() ) + return; + + if ( mbInitClipRegion ) + ImplInitClipRegion(); + + if ( mbOutputClipped ) + return; SalTwoRect aPosAry; aPosAry.mnSrcWidth = ImplLogicWidthToDevicePixel( rSrcSize.Width() ); |