diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-07-10 17:05:39 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-23 08:00:38 +0000 |
commit | 7249420f98baa1cd839354fc07923595d0188841 (patch) | |
tree | 369c42e7cad785d117204bee6b1ecb8d9600fcfc | |
parent | 136cfba30fc49f66f1f365d13ee0e717c4cd8f53 (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.
(same as master commit ee36fc7add892690c95a969530ecdcfc1bc9decc)
Conflicts:
vcl/source/gdi/outdev2.cxx
Change-Id: Ieb3d0b9dedeb3f1688eb30668e59750f3b569d9b
Reviewed-on: https://gerrit.libreoffice.org/10205
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit 1c269727b470c03f0ea538cad7e1331fd569a579)
Reviewed-on: https://gerrit.libreoffice.org/10341
Reviewed-by: Eike Rathke <erack@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/source/gdi/outdev2.cxx | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index 48ec303c2427..759c3b47b57f 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -1001,29 +1001,7 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize if(aBmpEx.IsAlpha()) { - Size aDestSizePixel(LogicToPixel(rDestSize)); - - BitmapEx aScaledBitmapEx(aBmpEx); - 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; - } - ImplDrawAlpha(aScaledBitmapEx.GetBitmap(), aScaledBitmapEx.GetAlpha(), rDestPt, rDestSize, aSrcPtPixel, aSrcSizePixel); + ImplDrawAlpha( aBmpEx.GetBitmap(), aBmpEx.GetAlpha(), rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel ); return; } @@ -2085,9 +2063,6 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha, if( !bNativeAlpha && !aBmpRect.Intersection( Rectangle( rSrcPtPixel, rSrcSizePixel ) ).IsEmpty() ) { - // The scaling in this code path produces really ugly results - it - // does the most trivial scaling with no smoothing. - GDIMetaFile* pOldMetaFile = mpMetaFile; const bool bOldMap = mbMap; mpMetaFile = NULL; // fdo#55044 reset before GetBitmap! |