summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drawinglayer/source/processor2d/vclhelperbufferdevice.cxx9
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx45
2 files changed, 31 insertions, 23 deletions
diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
index b22ddabf00a0..53c9b4876927 100644
--- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
+++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
@@ -334,7 +334,6 @@ namespace drawinglayer
mrOutDev.EnableMapMode(false);
mpContent->EnableMapMode(false);
- Bitmap aContent(mpContent->GetBitmap(aEmptyPoint, aSizePixel));
#ifdef DBG_UTIL
if(bDoSaveForVisualControl)
@@ -346,6 +345,7 @@ namespace drawinglayer
"~/content.bmp",
#endif
StreamMode::WRITE|StreamMode::TRUNC);
+ Bitmap aContent(mpContent->GetBitmap(aEmptyPoint, aSizePixel));
WriteDIB(aContent, aNew, false, true);
}
#endif
@@ -373,6 +373,7 @@ namespace drawinglayer
}
#endif
+ Bitmap aContent(mpContent->GetBitmap(aEmptyPoint, aSizePixel));
mrOutDev.DrawBitmapEx(maDestPixel.TopLeft(), BitmapEx(aContent, aAlphaMask));
}
else if(mpMask)
@@ -394,17 +395,21 @@ namespace drawinglayer
}
#endif
+ Bitmap aContent(mpContent->GetBitmap(aEmptyPoint, aSizePixel));
mrOutDev.DrawBitmapEx(maDestPixel.TopLeft(), BitmapEx(aContent, aMask));
}
else if(0.0 != fTrans)
{
sal_uInt8 nMaskValue(static_cast<sal_uInt8>(basegfx::fround(fTrans * 255.0)));
const AlphaMask aAlphaMask(aSizePixel, &nMaskValue);
+ Bitmap aContent(mpContent->GetBitmap(aEmptyPoint, aSizePixel));
mrOutDev.DrawBitmapEx(maDestPixel.TopLeft(), BitmapEx(aContent, aAlphaMask));
}
else
{
- mrOutDev.DrawBitmap(maDestPixel.TopLeft(), aContent);
+ mrOutDev.DrawOutDev(maDestPixel.TopLeft(), aSizePixel,
+ aEmptyPoint, aSizePixel,
+ *mpContent);
}
mrOutDev.SetRasterOp(aOrigRasterOp);
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index de94ac307120..40c36abac9e9 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -726,29 +726,32 @@ namespace drawinglayer
// back to old OutDev
mpOutputDevice = pLastOutputDevice;
- // draw mask
- if(getOptionsDrawinglayer().IsAntiAliasing())
+ // if the mask fills the whole area we can skip
+ // creating a transparent vd and filling it.
+ if (!basegfx::utils::isRectangle(aMask))
{
- // with AA, use 8bit AlphaMask to get nice borders
- VirtualDevice& rTransparence = aBufferDevice.getTransparence();
- rTransparence.SetLineColor();
- rTransparence.SetFillColor(COL_BLACK);
- rTransparence.DrawPolyPolygon(aMask);
-
- // dump buffer to outdev
- aBufferDevice.paint();
- }
- else
- {
- // No AA, use 1bit mask
- VirtualDevice& rMask = aBufferDevice.getMask();
- rMask.SetLineColor();
- rMask.SetFillColor(COL_BLACK);
- rMask.DrawPolyPolygon(aMask);
-
- // dump buffer to outdev
- aBufferDevice.paint();
+ // draw mask
+ if(getOptionsDrawinglayer().IsAntiAliasing())
+ {
+ // with AA, use 8bit AlphaMask to get nice borders
+ VirtualDevice& rTransparence = aBufferDevice.getTransparence();
+ rTransparence.SetLineColor();
+ rTransparence.SetFillColor(COL_BLACK);
+ rTransparence.DrawPolyPolygon(aMask);
+ }
+ else
+ {
+ // No AA, use 1bit mask
+ VirtualDevice& rMask = aBufferDevice.getMask();
+ rMask.SetLineColor();
+ rMask.SetFillColor(COL_BLACK);
+ rMask.DrawPolyPolygon(aMask);
+ }
}
+
+ // dump buffer to outdev
+ aBufferDevice.paint();
+
}
}
}