summaryrefslogtreecommitdiff
path: root/vcl/source/bitmap/bitmap.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-12-01 13:27:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-12-06 09:51:17 +0100
commitaa7d1c8f1411fe35465f265259cf1082adf05aea (patch)
tree4addfc59d01b1fd5470d660f5c48abbd28990fde /vcl/source/bitmap/bitmap.cxx
parent0f82e9d42822e627edd1fb3b3c87e1f8a22136a4 (diff)
make AlphaMask separate from Bitmap
Having it subclass Bitmap encourages confusion in passing it around, and I need the extra type-safety for my work on merged-alpha Change-Id: I35819f9b8ee609cbdaf865563c78531e397b529b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160235 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/bitmap/bitmap.cxx')
-rw-r--r--vcl/source/bitmap/bitmap.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx
index 1167789b7986..0bcd581f62d8 100644
--- a/vcl/source/bitmap/bitmap.cxx
+++ b/vcl/source/bitmap/bitmap.cxx
@@ -726,10 +726,10 @@ bool Bitmap::CopyPixel_AlphaOptimized( const tools::Rectangle& rRectDst, const t
}
bool Bitmap::CopyPixel_AlphaOptimized( const tools::Rectangle& rRectDst, const tools::Rectangle& rRectSrc,
- const Bitmap& rBmpSrc )
+ const AlphaMask& rBmpSrc )
{
assert(HasGreyPalette8Bit());
- assert(rBmpSrc.HasGreyPalette8Bit());
+ assert(rBmpSrc.GetBitmap().HasGreyPalette8Bit());
// Note: this code is copied from Bitmap::CopyPixel but avoids any palette lookups
// This optimization is possible because the palettes of AlphaMasks are always identical (8bit GreyPalette, see ctor)
const Size aSizePix( GetSizePixel() );
@@ -740,10 +740,10 @@ bool Bitmap::CopyPixel_AlphaOptimized( const tools::Rectangle& rRectDst, const t
if( aRectDst.IsEmpty() )
return false;
- if( rBmpSrc.mxSalBmp == mxSalBmp ) // self-copy
+ if( rBmpSrc.GetBitmap().mxSalBmp == mxSalBmp ) // self-copy
return CopyPixel_AlphaOptimized(rRectDst, rRectSrc);
- Bitmap* pSrc = &const_cast<Bitmap&>(rBmpSrc);
+ Bitmap* pSrc = &const_cast<Bitmap&>(rBmpSrc.GetBitmap());
const Size aCopySizePix( pSrc->GetSizePixel() );
tools::Rectangle aRectSrc( rRectSrc );