Kaydet (Commit) 2ef36289 authored tarafından Luboš Luňák's avatar Luboš Luňák

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: 's avatarLuboš Luňák <l.lunak@collabora.com>
üst 81435598
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment