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/qt5 | |
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/qt5')
-rw-r--r-- | vcl/qt5/Qt5Bitmap.cxx | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/vcl/qt5/Qt5Bitmap.cxx b/vcl/qt5/Qt5Bitmap.cxx index 341c5abc64d2..20f477bf9d1b 100644 --- a/vcl/qt5/Qt5Bitmap.cxx +++ b/vcl/qt5/Qt5Bitmap.cxx @@ -35,9 +35,9 @@ Qt5Bitmap::Qt5Bitmap(const QImage& rImage) { m_pImage.reset(new QImage(rImage)); bool Qt5Bitmap::Create(const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal) { - assert((nBitCount == 1 || nBitCount == 4 || nBitCount == 8 || nBitCount == 16 || nBitCount == 24 - || nBitCount == 32) - && "Unsupported BitCount!"); + assert( + (nBitCount == 1 || nBitCount == 4 || nBitCount == 8 || nBitCount == 24 || nBitCount == 32) + && "Unsupported BitCount!"); if (nBitCount == 1) assert(2 >= rPal.GetEntryCount()); @@ -119,8 +119,8 @@ bool Qt5Bitmap::Create(const SalBitmap& rSalBmp, SalGraphics* pSalGraphics) bool Qt5Bitmap::Create(const SalBitmap& rSalBmp, sal_uInt16 nNewBitCount) { - assert((nNewBitCount == 1 || nNewBitCount == 4 || nNewBitCount == 8 || nNewBitCount == 16 - || nNewBitCount == 24 || nNewBitCount == 32) + assert((nNewBitCount == 1 || nNewBitCount == 4 || nNewBitCount == 8 || nNewBitCount == 24 + || nNewBitCount == 32) && "Unsupported BitCount!"); const Qt5Bitmap* pBitmap = static_cast<const Qt5Bitmap*>(&rSalBmp); @@ -244,23 +244,6 @@ BitmapBuffer* Qt5Bitmap::AcquireBuffer(BitmapAccessMode /*nMode*/) pBuffer->mnFormat = ScanlineFormat::N8BitPal | ScanlineFormat::TopDown; pBuffer->maPalette = m_aPalette; break; - case 16: - { -#ifdef OSL_BIGENDIAN - pBuffer->mnFormat = ScanlineFormat::N16BitTcMsbMask | ScanlineFormat::TopDown; -#else - pBuffer->mnFormat = ScanlineFormat::N16BitTcLsbMask | ScanlineFormat::TopDown; -#endif - ColorMaskElement aRedMask(0xf800); // 5 - aRedMask.CalcMaskShift(); - ColorMaskElement aGreenMask(0x07e0); // 6 - aGreenMask.CalcMaskShift(); - ColorMaskElement aBlueMask(0x001f); // 5 - aBlueMask.CalcMaskShift(); - pBuffer->maColorMask = ColorMask(aRedMask, aGreenMask, aBlueMask); - pBuffer->maPalette = aEmptyPalette; - break; - } case 24: pBuffer->mnFormat = ScanlineFormat::N24BitTcRgb | ScanlineFormat::TopDown; pBuffer->maPalette = aEmptyPalette; @@ -275,6 +258,8 @@ BitmapBuffer* Qt5Bitmap::AcquireBuffer(BitmapAccessMode /*nMode*/) pBuffer->maPalette = aEmptyPalette; break; } + default: + assert(false); } return pBuffer; |