summaryrefslogtreecommitdiff
path: root/vcl/osx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2021-02-27 15:50:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-26 12:51:58 +0200
commitddd2639a482befb4a3bf1f75a88e66c21a691b67 (patch)
tree2d2a2a0695dce2b8b065f107368ef0412807fa73 /vcl/osx
parent9c4e0c35d70659097b235028047efcb80dcfb10d (diff)
drop mask from BitmapEx
So that we have fewer cases to deal with when we transition to 32-bit bitmaps. (*) rename maMask to maAlphaMask, since now it is only being used for alpha duties. (*) drop mbAlpha and mbTransparent to simplify state management, the only thing we need to check for alpha is if maAlphaMask is non-empty. Change-Id: I06252e38e950e846a94b4c2ba8ea763be17801fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111679 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/osx')
-rw-r--r--vcl/osx/salinst.cxx13
1 files changed, 2 insertions, 11 deletions
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 85651e2079e9..75aea4d5415a 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -911,9 +911,9 @@ CGImageRef CreateCGImage( const Image& rImage )
return nullptr;
CGImageRef xImage = nullptr;
- if( ! (aBmpEx.IsAlpha() || aBmpEx.IsTransparent() ) )
+ if( !aBmpEx.IsAlpha() )
xImage = pSalBmp->CreateCroppedImage( 0, 0, pSalBmp->mnWidth, pSalBmp->mnHeight );
- else if( aBmpEx.IsAlpha() )
+ else
{
AlphaMask aAlphaMask( aBmpEx.GetAlpha() );
Bitmap aMask( aAlphaMask.GetBitmap() );
@@ -923,15 +923,6 @@ CGImageRef CreateCGImage( const Image& rImage )
else
xImage = pSalBmp->CreateCroppedImage( 0, 0, pSalBmp->mnWidth, pSalBmp->mnHeight );
}
- else if( aBmpEx.GetTransparentType() == TransparentType::Bitmap )
- {
- Bitmap aMask( aBmpEx.GetMask() );
- QuartzSalBitmap* pMaskBmp = static_cast<QuartzSalBitmap*>(aMask.ImplGetSalBitmap().get());
- if( pMaskBmp )
- xImage = pSalBmp->CreateWithMask( *pMaskBmp, 0, 0, pSalBmp->mnWidth, pSalBmp->mnHeight );
- else
- xImage = pSalBmp->CreateCroppedImage( 0, 0, pSalBmp->mnWidth, pSalBmp->mnHeight );
- }
return xImage;
}