summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorPatrick Luby <plubius@neooffice.org>2023-08-06 01:35:01 +0200
committerPatrick Luby <plubius@neooffice.org>2023-08-06 01:48:12 +0200
commitb3053b63c65372627c5fb4df6b4ddcd5e12e16f7 (patch)
treec89eb141aeb2c231ac922f2d612d3f7aeb1a7712 /canvas
parent52637f46cc79eb7f65a97524e92a0b2f45d3d598 (diff)
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 <plubius@neooffice.org> Tested-by: Patrick Luby <plubius@neooffice.org>
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/vcl/spritehelper.cxx18
1 files changed, 2 insertions, 16 deletions
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();