[Libreoffice-commits] core.git: vcl/opengl
Luboš Luňák (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 16 11:43:11 UTC 2019
vcl/opengl/scale.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 2ef36289c78f4eb1ed25b5cf3913c441760aa111
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Mon Apr 15 15:23:57 2019 +0200
Commit: Luboš Luňák <l.lunak at 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.lunak at 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;
More information about the Libreoffice-commits
mailing list