vcl/opengl/scale.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2ef36289c78f4eb1ed25b5cf3913c441760aa111
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Mon Apr 15 15:23:57 2019 +0200
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Tue Apr 16 13:42:28 2019 +0200

    round() instead of truncating in two-pass OpenGL area scaling
    
    BitmapTest::testScale2() on Linux fails for me without this,
    as the two-pass setup higher truncates the size to integers, and
    truncating here again sets the final size as 64 instead of the expected 65
    
    Change-Id: I54748e29f0e0ca63539e42009759a93d6a5d6be2
    Reviewed-on: https://gerrit.libreoffice.org/70779
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/vcl/opengl/scale.cxx b/vcl/opengl/scale.cxx
index ae7146b6d6bf..2feaa183d25f 100644
--- a/vcl/opengl/scale.cxx
+++ b/vcl/opengl/scale.cxx
@@ -284,8 +284,8 @@ bool OpenGLSalBitmap::ImplScaleArea( const rtl::Reference< 
OpenGLContext > &xCon
         mnWidth = nNewWidth;
         mnHeight = nNewHeight;
 
-        nNewWidth = int(mnWidth * rScaleX);
-        nNewHeight = int (mnHeight * rScaleY);
+        nNewWidth = round(mnWidth * rScaleX);
+        nNewHeight = round(mnHeight * rScaleY);
 
         ixscale = 1 / rScaleX;
         iyscale = 1 / rScaleY;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to