diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-07-10 17:59:28 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-07-15 18:59:17 +0000 |
commit | 12a49fb66a8d3380b9a57ec1c252c2981f1724b1 (patch) | |
tree | 945f4af6a4962e554e052f47b48ed47d5307da17 | |
parent | 5c3bcc6fe3653aed79a11abbead66f11896e7ee8 (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
(cherry picked from commit ee36fc7add892690c95a969530ecdcfc1bc9decc)
Reviewed-on: https://gerrit.libreoffice.org/10204
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
-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) { |