[Libreoffice-commits] core.git: Branch 'aoo/trunk' - canvas/source

Armin Le Grand alg at apache.org
Thu Jan 30 10:08:05 PST 2014


 canvas/source/vcl/canvascustomsprite.cxx |    9 ++++++++-
 canvas/source/vcl/spritehelper.cxx       |    8 +++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

New commits:
commit 342ebf4c79972ba3e1159831fce04cdef80f585b
Author: Armin Le Grand <alg at apache.org>
Date:   Thu Jan 30 17:27:11 2014 +0000

    i12355 Allow 1bit masks for all OSes except Linux (see i122485)

diff --git a/canvas/source/vcl/canvascustomsprite.cxx b/canvas/source/vcl/canvascustomsprite.cxx
index 1287ed7..39ae9d6 100644
--- a/canvas/source/vcl/canvascustomsprite.cxx
+++ b/canvas/source/vcl/canvascustomsprite.cxx
@@ -81,7 +81,14 @@ namespace vclcanvas
         pBackBuffer->setSize( aSize );
 
         // create mask backbuffer, with one bit color depth #122485# use full depth to avoid problem with 1bit depth, get AAed masks
-        BackBufferSharedPtr pBackBufferMask( new BackBuffer( rOutDevProvider->getOutDev() ) ); // , true ) ); // #122485#
+        BackBufferSharedPtr pBackBufferMask(
+#if defined LINUX || defined FREEBSD || defined NETBSD
+            // #122485# no 1bit buffers on Linuxes, 1bit Vdev seems to work no longer
+            new BackBuffer( rOutDevProvider->getOutDev() ) );
+#else
+            // 1bit mask buffer for all others
+            new BackBuffer( rOutDevProvider->getOutDev(), true ) );
+#endif
         pBackBufferMask->setSize( aSize );
 
         // TODO(F1): Implement alpha vdev (could prolly enable
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx
index 2440ad3..b793090 100755
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -159,7 +159,13 @@ namespace vclcanvas
 
                     // bitmasks are much faster than alphamasks on some platforms
                     // so convert to bitmask if useful
-#ifndef QUARTZ
+#if defined LINUX || defined FREEBSD || defined NETBSD || defined QUARTZ
+                    // #122485# allow more than 1bit masks for Linux and Mac,
+                    // but reduce to mono now
+                    aMask.MakeMono(255);
+#else
+                    // #122485# assert when mask uses more than 1bit and reduce
+                    // to mono
                     if( aMask.GetBitCount() != 1 )
                     {
                         OSL_ENSURE(false,


More information about the Libreoffice-commits mailing list