[Libreoffice-commits] core.git: vcl/opengl
Michael Meeks
michael.meeks at collabora.com
Mon Jan 19 06:51:32 PST 2015
vcl/opengl/areaScaleFragmentShader.glsl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 35b77d0c13f15fc172104881e053e8527eebac2c
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Mon Jan 19 14:52:08 2015 +0000
vcl: fix glsl int casts of floats.
Change-Id: Ifa22e2914a1e34f6e2fd635973eca4101914bb88
diff --git a/vcl/opengl/areaScaleFragmentShader.glsl b/vcl/opengl/areaScaleFragmentShader.glsl
index cae5eb6..03fbe69 100644
--- a/vcl/opengl/areaScaleFragmentShader.glsl
+++ b/vcl/opengl/areaScaleFragmentShader.glsl
@@ -48,8 +48,8 @@ void main(void)
float fsx1 = dx * xscale;
float fsx2 = fsx1 + xscale;
// To whole pixel coordinates.
- int sx1 = ceil( fsx1 );
- int sx2 = floor( fsx2 );
+ int sx1 = int( ceil( fsx1 ) );
+ int sx2 = int( floor( fsx2 ) );
// Range checking.
sx2 = min( sx2, swidth - 1 );
sx1 = min( sx1, sx2 );
@@ -79,8 +79,8 @@ void main(void)
// The same for Y.
float fsy1 = dy * yscale;
float fsy2 = fsy1 + yscale;
- int sy1 = ceil( fsy1 );
- int sy2 = floor( fsy2 );
+ int sy1 = int( ceil( fsy1 ) );
+ int sy2 = int( floor( fsy2 ) );
sy2 = min( sy2, sheight - 1 );
sy1 = min( sy1, sy2 );
More information about the Libreoffice-commits
mailing list