diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-03-08 16:36:03 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-03-08 17:58:23 +0100 |
commit | ba0abd02df8d62342497018f516535a2f1597fb6 (patch) | |
tree | 99ab3afebff5bd3c8ced0fd60337f8ec1e610920 /vcl/opengl/salbmp.cxx | |
parent | e976dc17221d0dfcff745488c19545370ce92d75 (diff) |
tdf#121120 vcl opengl: handle 8-bit palette bitmap as 24 bit RGB texture
This fixes the black rectangle instead of actual image content in the
bugdoc.
An alternative would be to handle this in the PNG import, but commit
66dbd4da3afcadb1393daf9be9cecff71b86509a (tdf#113918: Workaround: Load
1bpp indexed PNG as 8bpp indexed Bitmap, 2017-11-20) already tried
something similar and failed, leading to the revert in commit
25cd843664919974f0d21ca7a0b02cc43e9eeabb (tdf#115297: alternative fix
for displaying 1bit images, 2018-02-27).
The test is especially useful with SAL_FORCEGL=1 SAL_USE_VCLPLUGIN=gen
specified on Linux, so the GL codepath is triggered.
Change-Id: Ia9d049d09dce2ac34826ee427f74616a96a35c88
Reviewed-on: https://gerrit.libreoffice.org/68925
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'vcl/opengl/salbmp.cxx')
-rw-r--r-- | vcl/opengl/salbmp.cxx | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx index 8e2eed0479ec..dc7418799e34 100644 --- a/vcl/opengl/salbmp.cxx +++ b/vcl/opengl/salbmp.cxx @@ -496,13 +496,6 @@ GLuint OpenGLSalBitmap::CreateTexture() determineTextureFormat(mnBits, nFormat, nType); } - else if( mnBits == 8 && maPalette.IsGreyPalette() ) - { - // no conversion needed for grayscale - pData = mpUserBuffer.get(); - nFormat = GL_LUMINANCE; - nType = GL_UNSIGNED_BYTE; - } else { VCL_GL_INFO( "::CreateTexture - convert from " << mnBits << " to 24 bits" ); |