canvas/source/vcl/spritehelper.cxx |   18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

New commits:
commit b3053b63c65372627c5fb4df6b4ddcd5e12e16f7
Author:     Patrick Luby <plub...@neooffice.org>
AuthorDate: Sun Aug 6 01:35:01 2023 +0200
Commit:     Patrick Luby <plub...@neooffice.org>
CommitDate: Sun Aug 6 01:48:12 2023 +0200

    Revert "tdf#156540 invert alpha when drawing sprites"
    
    This reverts commit 52637f46cc79eb7f65a97524e92a0b2f45d3d598.
    
    Reason for revert: A better fix is being worked on in 
https://gerrit.libreoffice.org/c/core/+/155378
    
    Change-Id: I91c6ed96bdd202612d4b10458c015532b9162c1a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155308
    Reviewed-by: Patrick Luby <plub...@neooffice.org>
    Tested-by: Patrick Luby <plub...@neooffice.org>

diff --git a/canvas/source/vcl/spritehelper.cxx 
b/canvas/source/vcl/spritehelper.cxx
index 54ad52216de7..3494a5fbda8f 100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -31,7 +31,6 @@
 #include <vcl/bitmapex.hxx>
 #include <vcl/canvastools.hxx>
 #include <vcl/outdev.hxx>
-#include <vcl/skia/SkiaHelper.hxx>
 
 #include <canvas/canvastools.hxx>
 
@@ -137,17 +136,10 @@ namespace vclcanvas
                 BitmapEx aMask( mpBackBufferMask->getOutDev().GetBitmapEx( 
aEmptyPoint,
                                                                        
aOutputSize ) );
 
-                AlphaMask aAlpha( aMask.GetBitmap() );
-#if HAVE_FEATURE_SKIA
-                // tdf#156540 invert alpha mask when using Skia
-                if ( SkiaHelper::isVCLSkiaEnabled() )
-                    aAlpha.Invert();
-#endif
-
                 // Note: since we retrieved aBmp and aMask
                 // directly from an OutDev, it's already a
                 // 'display bitmap' on windows.
-                maContent = BitmapEx( aBmp.GetBitmap(), aAlpha );
+                maContent = BitmapEx( aBmp.GetBitmap(), AlphaMask( 
aMask.GetBitmap()) );
             }
         }
 
@@ -188,13 +180,7 @@ namespace vclcanvas
         aMoveTransform.translate( aOutPos.X(), aOutPos.Y() );
         aTransform = aMoveTransform * aTransform * aSizeTransform;
 
-        // tdf#156540 invert alpha when Skia is disabled
-        bool bAlpha = false;
-#if HAVE_FEATURE_SKIA
-        if ( SkiaHelper::isVCLSkiaEnabled() )
-            bAlpha = true;
-#endif
-        rTargetSurface.DrawTransformedBitmapEx( aTransform, *maContent, bAlpha 
? fAlpha : 1.0 - fAlpha );
+        rTargetSurface.DrawTransformedBitmapEx( aTransform, *maContent, fAlpha 
);
 
         rTargetSurface.Pop();
 

Reply via email to