diff options
Diffstat (limited to 'vcl/source/outdev')
-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()); |