Kaydet (Commit) 93b34d09 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

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
üst d87b163f
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment