fdo#74124: Scale the pictures before calling ImplDrawAlpha().
commit3eb562503e94c25b6eb37bf66219f10ec67486bc
authorJan Holesovsky <kendy@collabora.com>
Mon, 27 Jan 2014 19:11:26 +0000 (27 20:11 +0100)
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Mon, 27 Jan 2014 21:26:56 +0000 (27 21:26 +0000)
tree79549b41f76a1026d3ba32ebabde0f81f8bda8cf
parent04c7b6fa027e525abf6fd0e1573ada76663ff6de
fdo#74124: Scale the pictures before calling ImplDrawAlpha().

When the source and destination bitmap do not have the same size,
ImplDrawAlpha() does not use direct paint, but instead it gets the image from
the screen, blends it with the provided bitmap, and again draws it.

Unfortunately, the blending uses the most trivial (and ugly) way of scaling;
so to produce much better results, let's scale to the destination size before
even calling ImplDrawAlpha().

The sideeffect is that we use the direct paint in most cases now; so hopefully
it pays off to do the (a bit more expensive) scale first.

Change-Id: I3b6b275710220910709ae4345ad6be3d6e4bf79c
Reviewed-on: https://gerrit.libreoffice.org/7701
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 39f0062a074c24fd2bdc5b20f457e51fc322c82b)
Reviewed-on: https://gerrit.libreoffice.org/7702
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
vcl/source/gdi/outdev2.cxx