diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-07-10 17:59:28 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-07-10 18:06:59 +0200 |
commit | ee36fc7add892690c95a969530ecdcfc1bc9decc (patch) | |
tree | 392470131982c1150dbd3456b8e81b01f2bae3ab | |
parent | 6363e1e3739cce7bc6ff6962b4021cf95fac340a (diff) |
fdo#80498: vcl: Revert "fdo#74124: Scale the pictures before calling ...
... ImplDrawAlpha()."
This reverts commit 3cf3700b7a903e88f5296076c40ae854bce91cdc.
It may look nicer but is unusably slow when scrolling in Writer.
Conflicts:
vcl/source/gdi/outdev2.cxx
Change-Id: I582f3f02a2f8915c244b04b2fe95b6af926396b9
-rw-r--r-- | vcl/source/outdev/bitmap.cxx | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 78302b37e28f..56c503358337 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -492,29 +492,7 @@ void OutputDevice::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize { if (rBitmapEx.IsAlpha()) { - Size aDestSizePixel(LogicToPixel(rDestSize)); - - BitmapEx aScaledBitmapEx(rBitmapEx); - Point aSrcPtPixel(rSrcPtPixel); - Size aSrcSizePixel(rSrcSizePixel); - - // we have beautiful scaling algorithms, let's use them - if (aDestSizePixel != rSrcSizePixel && rSrcSizePixel.Width() != 0 && rSrcSizePixel.Height() != 0) - { - double fScaleX = std::abs(aDestSizePixel.Width() / double(rSrcSizePixel.Width())); - double fScaleY = std::abs(aDestSizePixel.Height() / double(rSrcSizePixel.Height())); - - aScaledBitmapEx.Scale(fScaleX, fScaleY); - - // Negative size values are used for mirroring, but Scale already takes - // care of mirroring so convert all negative values to positive. - aSrcSizePixel = Size(std::abs(aDestSizePixel.Width()), - std::abs(aDestSizePixel.Height())); - - aSrcPtPixel.X() = rSrcPtPixel.X() * fScaleX; - aSrcPtPixel.Y() = rSrcPtPixel.Y() * fScaleY; - } - DrawDeviceAlphaBitmap(aScaledBitmapEx.GetBitmap(), aScaledBitmapEx.GetAlpha(), rDestPt, rDestSize, aSrcPtPixel, aSrcSizePixel); + DrawDeviceAlphaBitmap(rBitmapEx.GetBitmap(), rBitmapEx.GetAlpha(), rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel); } else if (!!rBitmapEx) { |