summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-07-10 17:05:39 +0200
committerMichael Stahl <mstahl@redhat.com>2014-07-15 18:59:19 +0000
commit1c269727b470c03f0ea538cad7e1331fd569a579 (patch)
tree57c550908b59cf5a6707d394c69e4270f84561db /vcl
parent763e3855caacbfc4818e70464bca348de10fbc3d (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>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/outdev2.cxx27
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!