[Libreoffice-commits] core.git: vcl/source
Caolán McNamara
caolanm at redhat.com
Tue Mar 21 09:51:49 UTC 2017
vcl/source/gdi/bitmapex.cxx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 155b1bc18a180dc036d61eb98184737058b84b8a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 21 09:49:42 2017 +0000
ofz#908 faster to scale a monochrome bitmap than a non-monochrome one
so if both are wrong, correct depth before scale
Change-Id: Ia0b6a194e14072a6f73f23e16ec640e0e1d34cf0
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 7a23c9a79c5b..a807ad3f054e 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -139,18 +139,18 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const Bitmap& rMask ) :
eTransparent ( !rMask ? TransparentType::NONE : TransparentType::Bitmap ),
bAlpha ( false )
{
- if(!!aBitmap && !!aMask && aBitmap.GetSizePixel() != aMask.GetSizePixel())
- {
- OSL_ENSURE(false, "Mask size differs from Bitmap size, corrected Mask (!)");
- aMask.Scale(aBitmap.GetSizePixel());
- }
-
// Ensure a mask is exactly one bit deep
if( !!aMask && aMask.GetBitCount() != 1 )
{
SAL_WARN( "vcl", "BitmapEx: forced mask to monochrome");
aMask.ImplMakeMono( 255 );
}
+
+ if(!!aBitmap && !!aMask && aBitmap.GetSizePixel() != aMask.GetSizePixel())
+ {
+ OSL_ENSURE(false, "Mask size differs from Bitmap size, corrected Mask (!)");
+ aMask.Scale(aBitmap.GetSizePixel());
+ }
}
BitmapEx::BitmapEx( const Bitmap& rBmp, const AlphaMask& rAlphaMask ) :
More information about the Libreoffice-commits
mailing list