[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - vcl/source
Michael Meeks
michael.meeks at suse.com
Mon Feb 25 02:36:37 PST 2013
vcl/source/gdi/bitmapex.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 0b73b1f6e3358dc484c4e684b3c8055da7071eb5
Author: Michael Meeks <michael.meeks at suse.com>
Date: Fri Feb 22 16:53:39 2013 +0000
perf: avoid scaling images to the same size at some cost.
Change-Id: Icae65a8bf48f76801c536607055be066be0bd49f
(cherry picked from commit cb8fcf5a169f030827b1150c50b6ed284717e485)
Signed-off-by: Fridrich Å trba <fridrich.strba at bluewin.ch>
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index f699432..45fe0aa 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -368,7 +368,9 @@ sal_Bool BitmapEx::Scale( const Size& rNewSize, sal_uLong nScaleFlag )
{
sal_Bool bRet;
- if( aBitmapSize.Width() && aBitmapSize.Height() )
+ if( aBitmapSize.Width() && aBitmapSize.Height() &&
+ ( rNewSize.Width() != aBitmapSize.Width() ||
+ rNewSize.Height() != aBitmapSize.Height() ) )
{
bRet = Scale( (double) rNewSize.Width() / aBitmapSize.Width(),
(double) rNewSize.Height() / aBitmapSize.Height(),
More information about the Libreoffice-commits
mailing list