[Libreoffice-commits] core.git: vcl/opengl

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Sun Mar 6 23:16:20 UTC 2016


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

New commits:
commit 729572957402e43d055482b51080034109b16ec6
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon Mar 7 00:05:28 2016 +0100

    opengl: fix inv.scale values are always integer - cid#1352479
    
    Force cast to double to avoid integer division - which gives a
    wrong inverse scale value.
    
    Change-Id: I0135e44ef07f3915619f9dfead9aadf50fc03685

diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 2efac97..24e1631 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1384,8 +1384,8 @@ void OpenGLSalGraphicsImpl::DrawTransformedTexture(
     if( nDestHeight == 0 || nDestWidth == 0 )
         return;
 
-    const double ixscale = rTexture.GetWidth()  / nDestWidth;
-    const double iyscale = rTexture.GetHeight() / nDestHeight;
+    const double ixscale = rTexture.GetWidth()  / double(nDestWidth);
+    const double iyscale = rTexture.GetHeight() / double(nDestHeight);
 
     bool areaScaling = false;
     bool fastAreaScaling = false;


More information about the Libreoffice-commits mailing list