simplify VirtualDevice::InnerImplSetOutputSizePixel

the pBuffer param is unused

Change-Id: I4185d7b573734afc1a3e3903f8f30811b2d00750
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182200
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2025-02-26 08:23:12 +02:00
parent 84cd2e5a71
commit c7b70df642
2 changed files with 5 additions and 12 deletions

View File

@@ -55,8 +55,7 @@ private:
bool mbForceZeroExtleadBug;
SAL_DLLPRIVATE void ImplInitVirDev( const OutputDevice* pOutDev, tools::Long nDX, tools::Long nDY, const SystemGraphicsData *pData = nullptr );
SAL_DLLPRIVATE bool InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase,
sal_uInt8* pBuffer );
SAL_DLLPRIVATE bool InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase );
VirtualDevice (const VirtualDevice &) = delete;
VirtualDevice & operator= (const VirtualDevice &) = delete;

View File

@@ -254,8 +254,7 @@ void VirtualDevice::dispose()
OutputDevice::dispose();
}
bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase,
sal_uInt8 *const pBuffer)
bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase)
{
SAL_INFO( "vcl.virdev",
"VirtualDevice::InnerImplSetOutputSizePixel( " << rNewSize.Width() << ", "
@@ -282,11 +281,7 @@ bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bEra
if ( bErase )
{
if ( pBuffer )
bRet = mpVirDev->SetSizeUsingBuffer( nNewWidth, nNewHeight, pBuffer );
else
bRet = mpVirDev->SetSize( nNewWidth, nNewHeight );
bRet = mpVirDev->SetSize( nNewWidth, nNewHeight );
if ( bRet )
{
mnOutWidth = rNewSize.Width();
@@ -296,7 +291,6 @@ bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bEra
}
else
{
assert(!pBuffer && "passing pBuffer without bErase is not supported");
std::unique_ptr<SalVirtualDevice> pNewVirDev;
ImplSVData* pSVData = ImplGetSVData();
@@ -359,7 +353,7 @@ void VirtualDevice::ImplFillOpaqueRectangle( const tools::Rectangle& rRect )
bool VirtualDevice::SetOutputSizePixel( const Size& rNewSize, bool bErase, bool bAlphaMaskTransparent )
{
if( InnerImplSetOutputSizePixel(rNewSize, bErase, /*pBuffer*/nullptr) )
if( InnerImplSetOutputSizePixel(rNewSize, bErase) )
{
if (meFormatAndAlpha != DeviceFormat::WITHOUT_ALPHA)
{
@@ -372,7 +366,7 @@ bool VirtualDevice::SetOutputSizePixel( const Size& rNewSize, bool bErase, bool
if( !mpAlphaVDev )
{
mpAlphaVDev = VclPtr<VirtualDevice>::Create(*this, meFormatAndAlpha);
mpAlphaVDev->InnerImplSetOutputSizePixel(rNewSize, bErase, nullptr);
mpAlphaVDev->InnerImplSetOutputSizePixel(rNewSize, bErase);
mpAlphaVDev->SetBackground( Wallpaper(bAlphaMaskTransparent ? COL_ALPHA_TRANSPARENT : COL_ALPHA_OPAQUE) );
mpAlphaVDev->Erase();
}