vcl/source/gdi/outdev2.cxx | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-)
New commits: commit 1c269727b470c03f0ea538cad7e1331fd569a579 Author: Michael Stahl <mst...@redhat.com> Date: Thu Jul 10 17:05:39 2014 +0200 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.me...@collabora.com> Tested-by: Michael Meeks <michael.me...@collabora.com> diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index 48ec303..759c3b4 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! _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits