diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2025-01-24 11:36:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2025-01-24 12:20:59 +0100 |
commit | e7befa23eacd46607afdf1363d9aaa93a589f547 (patch) | |
tree | 29d6c9e41855091cc9174a446a37ce5846008069 | |
parent | fee5ffe67ca3100a9fc2e4830aff2bea0d22591b (diff) |
remove remnants of 1-bit bitmap support
dead since
commit 21734247d58a6e915b058d8fa55ece949d049613
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Tue Jan 10 12:56:58 2023 +0200
drop internal support for 1-bit images
Change-Id: I755423e339dac797abc726012cfb96d27b8f15fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180690
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | vcl/win/gdi/salbmp.cxx | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx index d2f6fdbd265e..e88a366d2d75 100644 --- a/vcl/win/gdi/salbmp.cxx +++ b/vcl/win/gdi/salbmp.cxx @@ -514,20 +514,10 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, SalGraphics* pSGraphics ) WinSalGraphics* pGraphics = static_cast<WinSalGraphics*>(pSGraphics); HDC hDC = pGraphics->getHDC(); - HBITMAP hNewDDB; BITMAP aDDBInfo; PBYTE pBits = reinterpret_cast<PBYTE>(pBI) + pBI->bmiHeader.biSize + - ImplGetDIBColorCount( rSalBmp.mhDIB ) * sizeof( RGBQUAD ); - - if( pBI->bmiHeader.biBitCount == 1 ) - { - hNewDDB = CreateBitmap( pBI->bmiHeader.biWidth, pBI->bmiHeader.biHeight, 1, 1, nullptr ); - - if( hNewDDB ) - SetDIBits( hDC, hNewDDB, 0, pBI->bmiHeader.biHeight, pBits, pBI, DIB_RGB_COLORS ); - } - else - hNewDDB = CreateDIBitmap( hDC, &pBI->bmiHeader, CBM_INIT, pBits, pBI, DIB_RGB_COLORS ); + ImplGetDIBColorCount( rSalBmp.mhDIB ) * sizeof( RGBQUAD ); + HBITMAP hNewDDB = CreateDIBitmap( hDC, &pBI->bmiHeader, CBM_INIT, pBits, pBI, DIB_RGB_COLORS ); GlobalUnlock( rSalBmp.mhDIB ); @@ -773,11 +763,11 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( BitmapAccessMode /*nMode*/ ) { pBuffer.reset(new BitmapBuffer); - pBuffer->meFormat = pBIH->biBitCount == 1 ? ScanlineFormat::N1BitMsbPal : - pBIH->biBitCount == 8 ? ScanlineFormat::N8BitPal : + pBuffer->meFormat = pBIH->biBitCount == 8 ? ScanlineFormat::N8BitPal : pBIH->biBitCount == 24 ? ScanlineFormat::N24BitTcBgr : pBIH->biBitCount == 32 ? ScanlineFormat::N32BitTcMask : ScanlineFormat::NONE; + assert (pBuffer->meFormat != ScanlineFormat::NONE); if (pBuffer->meFormat != ScanlineFormat::NONE) { |