diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-10-12 12:12:07 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-10-12 15:53:48 +0200 |
commit | 0fa9920391ed3bb6aa6ef0f5220050f2c694f859 (patch) | |
tree | 2b9543f3016fab59faf5707b625a86cd09f69b80 /vcl | |
parent | 3a5808f5e43f5e190b3f1c759563a951b5bb0d08 (diff) |
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@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/outdev/bitmap.cxx | 17 |
1 files changed, 7 insertions, 10 deletions
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()); |