summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-04-03 09:49:16 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-04-03 10:13:49 +0200
commitc1959f505eb9322557dd915f2eefb49ce02f2802 (patch)
tree50f389b04d86916e7475b00e12af19e14d1cd2c7 /slideshow
parent036053b969bf95a4cb9b16601f2651ca227dd429 (diff)
Use 64-KiB buffer instead of 256-KiB
We only use red channel anyway, so no need to also waste space for G, B and A. Change-Id: I2bacef36d1e9845287a205a5f6473952ef59083e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113552 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/opengl/TransitionImpl.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/slideshow/source/engine/opengl/TransitionImpl.cxx b/slideshow/source/engine/opengl/TransitionImpl.cxx
index 98d6778fd197..f8d062d34941 100644
--- a/slideshow/source/engine/opengl/TransitionImpl.cxx
+++ b/slideshow/source/engine/opengl/TransitionImpl.cxx
@@ -1473,18 +1473,18 @@ void initPermTexture(GLuint *texID)
glBindTexture(GL_TEXTURE_2D, *texID);
static bool initialized = false;
- static unsigned char permutation2D[256*256*4];
+ static unsigned char permutation2D[256*256];
if( !initialized ) {
int x, y;
for( y=0; y < 256; y++ )
for( x=0; x < 256; x++ )
- permutation2D[x*4 + y*1024] = permutation256[(y + permutation256[x]) & 0xff];
+ permutation2D[x + y*256] = permutation256[(y + permutation256[x]) & 0xff];
initialized = true;
}
- glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, permutation2D );
+ glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RED, GL_UNSIGNED_BYTE, permutation2D );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
CHECK_GL_ERROR();