[Libreoffice-commits] core.git: Branch 'feature/fixes18' - vcl/opengl
Marco Cecchetti
marco.cecchetti at collabora.com
Thu Mar 17 15:56:58 UTC 2016
vcl/opengl/scale.cxx | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
New commits:
commit bb3f3f952bb8d26e624babd3d1fd4501f46a2958
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date: Thu Mar 17 16:41:59 2016 +0100
area scale shader - 2 passes impl - sqrt scale factor
Change-Id: I5a64fbadc746f004f858ee6359971404e3bab93f
diff --git a/vcl/opengl/scale.cxx b/vcl/opengl/scale.cxx
index b86faec..81c3193 100644
--- a/vcl/opengl/scale.cxx
+++ b/vcl/opengl/scale.cxx
@@ -219,28 +219,16 @@ bool OpenGLSalBitmap::ImplScaleArea( const rtl::Reference< OpenGLContext > &xCon
}
else
{
- if (ixscale > 16)
+ if ( ixscale > 16 || iyscale > 16 )
{
- ixscale = 16;
+ ixscale = std::floor(std::sqrt(ixscale));
+ iyscale = std::floor(std::sqrt(iyscale));
nNewWidth = int(mnWidth / ixscale);
rScaleX *= ixscale; // second pass x-scale factor
- bTwoPasses = true;
- }
- else
- {
- rScaleX = 1;
- }
- if (iyscale > 16)
- {
- iyscale = 16;
nNewHeight = int(mnHeight / iyscale);
rScaleY *= iyscale; // second pass y-scale factor
bTwoPasses = true;
}
- else
- {
- rScaleY = 1;
- }
}
// TODO Make sure the framebuffer is alright
More information about the Libreoffice-commits
mailing list