[Libreoffice-commits] core.git: vcl/source
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Mon Oct 12 13:58:21 UTC 2020
vcl/source/outdev/bitmap.cxx | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
New commits:
commit 0fa9920391ed3bb6aa6ef0f5220050f2c694f859
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Mon Oct 12 12:12:07 2020 +0200
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon Oct 12 15:53:48 2020 +0200
don't disable the fast path in DrawDeviceAlphaBitmap() (tdf#137311)
Only OpenGL and Skia implement the BlendBitmap*() calls, and so I
disabled the direct path in an attempt to avoid forcing the mirroring
if it takes place. But there's also the DrawAlphaBitmap() call
that is implemented for other backends. So always do the mirroring
already there if it takes place.
Change-Id: I8c4c96ea18ac55ebad041e0d28c4228542d9b2e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104206
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 2a013fe119b2..c584a1d82848 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -650,16 +650,8 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r
if (aDstRect.Intersection(tools::Rectangle(aOutPt, aOutSz)).IsEmpty())
return;
- bool bTryDirectPaint = false;
- if(SkiaHelper::isVCLSkiaEnabled())
- bTryDirectPaint = true;
-#if HAVE_FEATURE_OPENGL
- if(OpenGLHelper::isVCLOpenGLEnabled())
- bTryDirectPaint = true;
-#endif
static const char* pDisableNative = getenv( "SAL_DISABLE_NATIVE_ALPHA");
- if(pDisableNative)
- bTryDirectPaint = false;
+ bool bTryDirectPaint = !pDisableNative;
if (bTryDirectPaint)
{
@@ -701,7 +693,12 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r
if (mpGraphics->DrawAlphaBitmap(aTR, *pSalSrcBmp, *pSalAlphaBmp, this))
return;
}
- assert(false);
+
+ // we need to make sure OpenGL never reaches this slow code path
+#if HAVE_FEATURE_OPENGL
+ assert(!OpenGLHelper::isVCLOpenGLEnabled());
+#endif
+ assert(!SkiaHelper::isVCLSkiaEnabled());
}
tools::Rectangle aBmpRect(Point(), rBmp.GetSizePixel());
More information about the Libreoffice-commits
mailing list