summaryrefslogtreecommitdiff
path: root/canvas/source/vcl/bitmapbackbuffer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'canvas/source/vcl/bitmapbackbuffer.cxx')
-rw-r--r--canvas/source/vcl/bitmapbackbuffer.cxx36
1 files changed, 18 insertions, 18 deletions
diff --git a/canvas/source/vcl/bitmapbackbuffer.cxx b/canvas/source/vcl/bitmapbackbuffer.cxx
index 598f1ef04f64..0072a807ea31 100644
--- a/canvas/source/vcl/bitmapbackbuffer.cxx
+++ b/canvas/source/vcl/bitmapbackbuffer.cxx
@@ -106,30 +106,30 @@ namespace vclcanvas
void BitmapBackBuffer::createVDev() const
{
- if( !mpVDev )
- {
- // VDev not yet created, do it now. Create an alpha-VDev,
- // if bitmap has transparency.
- mpVDev = maBitmap->IsTransparent() ?
- VclPtr<VirtualDevice>::Create( mrRefDevice, DeviceFormat::DEFAULT, DeviceFormat::DEFAULT ) :
- VclPtr<VirtualDevice>::Create( mrRefDevice );
+ if( mpVDev )
+ return;
+
+ // VDev not yet created, do it now. Create an alpha-VDev,
+ // if bitmap has transparency.
+ mpVDev = maBitmap->IsTransparent() ?
+ VclPtr<VirtualDevice>::Create( mrRefDevice, DeviceFormat::DEFAULT, DeviceFormat::DEFAULT ) :
+ VclPtr<VirtualDevice>::Create( mrRefDevice );
- OSL_ENSURE( mpVDev,
- "BitmapBackBuffer::createVDev(): Unable to create VirtualDevice" );
+ OSL_ENSURE( mpVDev,
+ "BitmapBackBuffer::createVDev(): Unable to create VirtualDevice" );
- mpVDev->SetOutputSizePixel( maBitmap->GetSizePixel() );
+ mpVDev->SetOutputSizePixel( maBitmap->GetSizePixel() );
- // #i95645#
+ // #i95645#
#if defined( MACOSX )
- // use AA on VCLCanvas for Mac
- mpVDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw | mpVDev->GetAntialiasing() );
+ // use AA on VCLCanvas for Mac
+ mpVDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw | mpVDev->GetAntialiasing() );
#else
- // switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and
- // is not required to do AA. It would need to be adapted to use it correctly
- // (especially gradient painting). This will need extra work.
- mpVDev->SetAntialiasing(mpVDev->GetAntialiasing() & ~AntialiasingFlags::EnableB2dDraw);
+ // switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and
+ // is not required to do AA. It would need to be adapted to use it correctly
+ // (especially gradient painting). This will need extra work.
+ mpVDev->SetAntialiasing(mpVDev->GetAntialiasing() & ~AntialiasingFlags::EnableB2dDraw);
#endif
- }
}
void BitmapBackBuffer::updateVDev() const