diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-09-05 15:46:46 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-09-05 18:27:08 +0200 |
commit | ad657dddd0b5f34a7fedde54b90d59d69513336d (patch) | |
tree | 80b59764fe357c8f0f7007653fab32976c870357 /vcl/source/gdi | |
parent | 8cb5c2565e87a3f1e026bdb9f9308f6ea8fd1452 (diff) |
consistently use RemoveScanline
Change-Id: Iad0bbbf1e2a522778fe4a88632bd7cbce4e2008c
Reviewed-on: https://gerrit.libreoffice.org/78661
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/bmpfast.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx index 32ff21c88076..393a634c6127 100644 --- a/vcl/source/gdi/bmpfast.cxx +++ b/vcl/source/gdi/bmpfast.cxx @@ -379,7 +379,7 @@ static bool ImplConvertFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc TrueColorPixelPtr<SRCFMT> aSrcType; aSrcType.SetRawPtr( rSrc.mpBits ); // select the matching instantiation for the destination's bitmap format - switch( rDst.mnFormat & ~ScanlineFormat::TopDown ) + switch (RemoveScanline(rDst.mnFormat)) { case ScanlineFormat::N1BitMsbPal: case ScanlineFormat::N1BitLsbPal: @@ -460,8 +460,8 @@ bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc, if( rDst.mnHeight < rTR.mnDestY + rTR.mnDestHeight ) return false; - const ScanlineFormat nSrcFormat = rSrc.mnFormat & ~ScanlineFormat::TopDown; - const ScanlineFormat nDstFormat = rDst.mnFormat & ~ScanlineFormat::TopDown; + const ScanlineFormat nSrcFormat = RemoveScanline(rSrc.mnFormat); + const ScanlineFormat nDstFormat = RemoveScanline(rDst.mnFormat); // TODO: also implement conversions for 16bit colormasks with non-565 format if( nSrcFormat & (ScanlineFormat::N16BitTcLsbMask | ScanlineFormat::N16BitTcMsbMask) ) @@ -610,7 +610,7 @@ static bool ImplBlendFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc, c TrueColorPixelPtr<SRCFMT> aSrcType; aSrcType.SetRawPtr( rSrc.mpBits ); // select the matching instantiation for the destination's bitmap format - switch( rDst.mnFormat & ~ScanlineFormat::TopDown ) + switch (RemoveScanline(rDst.mnFormat)) { case ScanlineFormat::N1BitMsbPal: case ScanlineFormat::N1BitLsbPal: @@ -707,8 +707,8 @@ bool ImplFastBitmapBlending( BitmapWriteAccess const & rDstWA, const BitmapBuffer& rSrc = *rSrcRA.ImplGetBitmapBuffer(); const BitmapBuffer& rMsk = *rMskRA.ImplGetBitmapBuffer(); - const ScanlineFormat nSrcFormat = rSrc.mnFormat & ~ScanlineFormat::TopDown; - const ScanlineFormat nDstFormat = rDst.mnFormat & ~ScanlineFormat::TopDown; + const ScanlineFormat nSrcFormat = RemoveScanline(rSrc.mnFormat); + const ScanlineFormat nDstFormat = RemoveScanline(rDst.mnFormat); // accelerated conversions for 16bit colormasks with non-565 format are not yet implemented if( nSrcFormat & (ScanlineFormat::N16BitTcLsbMask | ScanlineFormat::N16BitTcMsbMask) ) @@ -769,7 +769,7 @@ bool ImplFastBitmapBlending( BitmapWriteAccess const & rDstWA, bool ImplFastEraseBitmap( BitmapBuffer& rDst, const BitmapColor& rColor ) { - const ScanlineFormat nDstFormat = rDst.mnFormat & ~ScanlineFormat::TopDown; + const ScanlineFormat nDstFormat = RemoveScanline(rDst.mnFormat); // erasing a bitmap is often just a byte-wise memory fill bool bByteFill = true; |