diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2019-09-24 21:38:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-26 03:04:01 +0200 |
commit | 78b9dac2ee77bf6efc1298962cbeca284db5b00a (patch) | |
tree | 120d13b666f6d2a67a4e79b5dd05b65a13bd2458 /vcl/opengl/salbmp.cxx | |
parent | 3a7d479c4c852499e8e4e2bc4273f02aec5051be (diff) |
remove internal use of 16-bit packed formats
none of our supported hardware uses these any more
Change-Id: Ic95d6df619a05df0bec1f5870596cb2bb3bcc6cb
Reviewed-on: https://gerrit.libreoffice.org/79476
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/opengl/salbmp.cxx')
-rw-r--r-- | vcl/opengl/salbmp.cxx | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx index 3fb8a397232b..f626c207e488 100644 --- a/vcl/opengl/salbmp.cxx +++ b/vcl/opengl/salbmp.cxx @@ -56,10 +56,6 @@ bool determineTextureFormat(sal_uInt16 nBits, GLenum& nFormat, GLenum& nType) nFormat = GL_LUMINANCE; nType = GL_UNSIGNED_BYTE; return true; - case 16: - nFormat = GL_RGB; - nType = GL_UNSIGNED_SHORT_5_6_5; - return true; case 24: nFormat = GL_RGB; nType = GL_UNSIGNED_BYTE; @@ -77,7 +73,7 @@ bool determineTextureFormat(sal_uInt16 nBits, GLenum& nFormat, GLenum& nType) bool isValidBitCount( sal_uInt16 nBitCount ) { - return (nBitCount == 1) || (nBitCount == 4) || (nBitCount == 8) || (nBitCount == 16) || (nBitCount == 24) || (nBitCount == 32); + return (nBitCount == 1) || (nBitCount == 4) || (nBitCount == 8) || (nBitCount == 24) || (nBitCount == 32); } sal_uInt32 lclBytesPerRow(sal_uInt16 nBits, int nWidth) @@ -87,7 +83,6 @@ sal_uInt32 lclBytesPerRow(sal_uInt16 nBits, int nWidth) case 1: return (nWidth + 7) >> 3; case 4: return (nWidth + 1) >> 1; case 8: return nWidth; - case 16: return nWidth * 2; case 24: return nWidth * 3; case 32: return nWidth * 4; default: @@ -493,7 +488,7 @@ GLuint OpenGLSalBitmap::CreateTexture() if (mpUserBuffer != nullptr) { - if( mnBits == 16 || mnBits == 24 || mnBits == 32 ) + if( mnBits == 24 || mnBits == 32 ) { // no conversion needed for truecolor pData = mpUserBuffer.get(); @@ -579,7 +574,7 @@ bool OpenGLSalBitmap::ReadTexture() xContext->state().scissor().disable(); xContext->state().stencil().disable(); - if ((mnBits == 8 && maPalette.IsGreyPalette()) || mnBits == 16 || mnBits == 24 || mnBits == 32) + if ((mnBits == 8 && maPalette.IsGreyPalette()) || mnBits == 24 || mnBits == 32) { determineTextureFormat(mnBits, nFormat, nType); @@ -803,18 +798,6 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( BitmapAccessMode nMode ) case 8: pBuffer->mnFormat = ScanlineFormat::N8BitPal; break; - case 16: - { - pBuffer->mnFormat = ScanlineFormat::N16BitTcMsbMask; - ColorMaskElement aRedMask(0x0000f800); - aRedMask.CalcMaskShift(); - ColorMaskElement aGreenMask(0x000007e0); - aGreenMask.CalcMaskShift(); - ColorMaskElement aBlueMask(0x0000001f); - aBlueMask.CalcMaskShift(); - pBuffer->maColorMask = ColorMask(aRedMask, aGreenMask, aBlueMask); - break; - } case 24: { pBuffer->mnFormat = ScanlineFormat::N24BitTcRgb; @@ -832,6 +815,7 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( BitmapAccessMode nMode ) pBuffer->maColorMask = ColorMask(aRedMask, aGreenMask, aBlueMask); break; } + default: assert(false); } return pBuffer; |