[Libreoffice-commits] core.git: vcl/source
Michael Stahl
mstahl at redhat.com
Thu Jul 10 09:10:56 PDT 2014
vcl/source/outdev/bitmap.cxx | 24 +-----------------------
1 file changed, 1 insertion(+), 23 deletions(-)
New commits:
commit ee36fc7add892690c95a969530ecdcfc1bc9decc
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Jul 10 17:59:28 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.
Conflicts:
vcl/source/gdi/outdev2.cxx
Change-Id: I582f3f02a2f8915c244b04b2fe95b6af926396b9
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 78302b3..56c5033 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)
{
More information about the Libreoffice-commits
mailing list