summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2013-01-24 16:55:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-14 17:21:55 +0100
commitff422b8b153289143d16857890cbe3c0b411cd54 (patch)
treec99e6880c9a05e1e963355bea6ccb2c25d6be4fd /drawinglayer
parent9b4c604e1eb790d7f86097653d6ae4f19bd6fe14 (diff)
Related: #i121534# avoid expensive emulation of 1bit masks for Mac's Quartz
(cherry picked from commit 194c7ff906c9164a522f924dc1c1f8c5fc81b6e6) Change-Id: I28a31c5abb14ceb72dc290e6ed2161c0ef6592df
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx6
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx7
2 files changed, 11 insertions, 2 deletions
diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
index ee51ea0f1309..99a1ff728f45 100644
--- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
@@ -179,7 +179,11 @@ namespace
// create BitmapEx
Bitmap aMainBitmap = aVirtualDevice.GetBitmap(Point(), aVirtualDevice.GetOutputSizePixel());
- Bitmap aMaskBitmap = aVirtualDeviceMask.GetBitmap(Point(), aVirtualDeviceMask.GetOutputSizePixel());
+#if defined(MACOSX)
+ AlphaMask aMaskBitmap( aVirtualDeviceMask.GetBitmap( Point(), aVirtualDeviceMask.GetOutputSizePixel()));
+#else
+ Bitmap aMaskBitmap = aVirtualDeviceMask.GetBitmap( Point(), aVirtualDeviceMask.GetOutputSizePixel());
+#endif
aNextStep.maBitmapEx = BitmapEx(aMainBitmap, aMaskBitmap);
// add to vector
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index a11c49b0fe4c..56d56b73b4ac 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -464,7 +464,12 @@ namespace drawinglayer
{
// parts will be uncovered, extend aBitmapEx with a mask bitmap
const Bitmap aContent(aBitmapEx.GetBitmap());
- aBitmapEx = BitmapEx(aContent, Bitmap(aContent.GetSizePixel(), 1));
+#if defined(MACOSX)
+ const AlphaMask aMaskBmp( aContent.GetSizePixel());
+#else
+ const Bitmap aMaskBmp( aContent.GetSizePixel(), 1);
+#endif
+ aBitmapEx = BitmapEx(aContent, aMaskBmp);
}
// draw using OutputDevice'sDrawTransformedBitmapEx