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

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 15 13:28:29 UTC 2019


 vcl/opengl/shaders/areaScaleFragmentShader.glsl |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit b9d101e9f96c2e9fc698cb0f84508e346a976060
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Wed Apr 3 11:02:48 2019 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon Apr 15 15:27:00 2019 +0200

    restore code comments
    
    These got removed in d115a235bf3ff5366 for some reason.
    
    Change-Id: I27eadc7f9f874f420ab0273e0ef2b62af57f6c4a

diff --git a/vcl/opengl/shaders/areaScaleFragmentShader.glsl b/vcl/opengl/shaders/areaScaleFragmentShader.glsl
index e16133682ba2..07945e3ebe44 100644
--- a/vcl/opengl/shaders/areaScaleFragmentShader.glsl
+++ b/vcl/opengl/shaders/areaScaleFragmentShader.glsl
@@ -127,9 +127,16 @@ void main(void)
     int dx = int( tex_coord.s * xdestconvert );
     int dy = int( tex_coord.t * ydestconvert );
 
+    // How much each column/row will contribute to the resulting pixel.
+    // Note: These values are always the same for the same X (or Y),
+    // so they could be precalculated in C++ and passed to the shader,
+    // but GLSL has limits on the size of uniforms passed to it,
+    // so it'd need something like texture buffer objects from newer
+    // GLSL versions, and it seems the hassle is not really worth it.
     float xratio[ 16 + 2 ];
     float yratio[ 16 + 2 ];
 
+    // For finding the first and last source pixel.
     int xpixel[ 16 + 2 ];
     int ypixel[ 16 + 2 ];
 


More information about the Libreoffice-commits mailing list