svx/source/dialog/_bmpmask.cxx | 5 +---- vcl/source/graphic/GraphicObject2.cxx | 2 +- vcl/source/rendercontext/drawmode.cxx | 2 +- vcl/workben/vcldemo.cxx | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-)
New commits: commit f4edd6258dff38c45e4a6b709e4e1d72a55a446c Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Nov 28 12:43:25 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Nov 28 19:55:51 2023 +0100 simplify some BitmapEx constructions using the color bitmap __and__ the alpha from another BitmapEx is equivalent to just doing a straight copy/assign Change-Id: I134ab8a1197ed538823afc4a8cd28b3d5986c6b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160019 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index 1db7e661cdd7..3e6a56a79f91 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -994,10 +994,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic ) if ( aBitmapEx.GetSizePixel().Width() && aBitmapEx.GetSizePixel().Height() ) { ImpMask( aBitmapEx ); - if ( aGraphic.IsTransparent() ) - aGraphic = Graphic( BitmapEx( aBitmapEx.GetBitmap(), aBitmapEx.GetAlphaMask() ) ); - else - aGraphic = aBitmapEx; + aGraphic = Graphic( aBitmapEx ); } } } diff --git a/vcl/source/graphic/GraphicObject2.cxx b/vcl/source/graphic/GraphicObject2.cxx index 02a9374759bf..2f60e315d5ef 100644 --- a/vcl/source/graphic/GraphicObject2.cxx +++ b/vcl/source/graphic/GraphicObject2.cxx @@ -457,7 +457,7 @@ void GraphicObject::ImplTransformBitmap( BitmapEx& rBmpEx, if( rBmpEx.IsAlpha() ) { - aBmpEx2 = BitmapEx( rBmpEx.GetBitmap(), rBmpEx.GetAlphaMask() ); + aBmpEx2 = rBmpEx; } else { diff --git a/vcl/source/rendercontext/drawmode.cxx b/vcl/source/rendercontext/drawmode.cxx index ab3b36e0223d..fd3f29ac275f 100644 --- a/vcl/source/rendercontext/drawmode.cxx +++ b/vcl/source/rendercontext/drawmode.cxx @@ -269,7 +269,7 @@ BitmapEx GetBitmapEx(BitmapEx const& rBitmapEx, DrawModeFlags nDrawMode) } else { - aBmpEx = BitmapEx(aColorBmp, aBmpEx.GetAlphaMask()); + aBmpEx = BitmapEx(aColorBmp); } } diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 346de0b52a09..1214a61a9406 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1406,8 +1406,7 @@ public: rDev.DrawBitmap(aBelow, aGrey); aBelow.Move(aGrey.GetSizePixel().Width(),0); - BitmapEx aGreyMask(aSrc.GetBitmap(), - aSrc.GetAlphaMask()); + BitmapEx aGreyMask(aSrc); rDev.DrawBitmapEx(aBelow, aGreyMask); aLocation.Move(aSrc.GetSizePixel().Width()*6,0);