vcl: Use the fast path for rendering.
There was a discrepancy between the comment and the code; and I believe the
comment was right, and the code wrong - so adapted the code accordingly.
[I guess we will want to kill this condition for good when rendering via
OpenGL at some stage; the assert() will tell us ;-)]
Change-Id: I651261373068e975004c898b2a930c602c158b64
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 4955b4b..9a2e56d 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -527,7 +527,7 @@ void OutputDevice::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize
// only paint direct when no scaling and no MapMode, else the
// more expensive conversions may be done for short-time Bitmap/BitmapEx
// used for buffering only
if(!IsMapMode() && aPosAry.mnSrcWidth == aPosAry.mnDestWidth && aPosAry.mnSrcHeight == aPosAry.mnDestHeight)
if (IsMapMode() || aPosAry.mnSrcWidth != aPosAry.mnDestWidth || aPosAry.mnSrcHeight != aPosAry.mnDestHeight)
{
bTryDirectPaint = false;
}
@@ -661,18 +661,16 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r
// separate alpha VDev
bool bTryDirectPaint(!mpAlphaVDev && !pDisableNative && !bHMirr && !bVMirr);
#ifdef WNT
if(bTryDirectPaint)
if (bTryDirectPaint)
{
// only paint direct when no scaling and no MapMode, else the
// more expensive conversions may be done for short-time Bitmap/BitmapEx
// used for buffering only
if(!IsMapMode() && rSrcSizePixel.Width() == aOutSz.Width() && rSrcSizePixel.Height() == aOutSz.Height())
if (IsMapMode() || rSrcSizePixel.Width() != aOutSz.Width() || rSrcSizePixel.Height() != aOutSz.Height())
{
bTryDirectPaint = false;
}
}
#endif
if(bTryDirectPaint)
{