Kaydet (Commit) 342ebf4c authored tarafından Armin Le Grand's avatar Armin Le Grand

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

üst 55aeb4eb
...@@ -81,7 +81,14 @@ namespace vclcanvas ...@@ -81,7 +81,14 @@ namespace vclcanvas
pBackBuffer->setSize( aSize ); pBackBuffer->setSize( aSize );
// create mask backbuffer, with one bit color depth #122485# use full depth to avoid problem with 1bit depth, get AAed masks // 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 ); pBackBufferMask->setSize( aSize );
// TODO(F1): Implement alpha vdev (could prolly enable // TODO(F1): Implement alpha vdev (could prolly enable
......
...@@ -159,7 +159,13 @@ namespace vclcanvas ...@@ -159,7 +159,13 @@ namespace vclcanvas
// bitmasks are much faster than alphamasks on some platforms // bitmasks are much faster than alphamasks on some platforms
// so convert to bitmask if useful // 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 ) if( aMask.GetBitCount() != 1 )
{ {
OSL_ENSURE(false, OSL_ENSURE(false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment