summaryrefslogtreecommitdiff
path: root/vcl/source/outdev/bitmap.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-11-11 21:33:53 +0100
committerJan Holesovsky <kendy@collabora.com>2014-11-11 21:47:03 +0100
commit93b34d091756de6fc3e5424aa45e00397146cc51 (patch)
tree5dc80d267d2b710659dc326d799ceadf8a4bca46 /vcl/source/outdev/bitmap.cxx
parentd87b163f8dc787d3bbb17d4a0008ef60c61fe6b0 (diff)
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
Diffstat (limited to 'vcl/source/outdev/bitmap.cxx')
-rw-r--r--vcl/source/outdev/bitmap.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 4955b4b91995..9a2e56d106a7 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)
{