include/vcl/virdev.hxx    |    3 +--
 vcl/source/gdi/virdev.cxx |   14 ++++----------
 2 files changed, 5 insertions(+), 12 deletions(-)

New commits:
commit c7b70df642ab07e9aabf03d40eb0e02864a30583
Author:     Noel Grandin <[email protected]>
AuthorDate: Wed Feb 26 08:23:12 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Wed Feb 26 09:55:48 2025 +0100

    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 <[email protected]>

diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx
index 6025658ce099..51a6194d6509 100644
--- a/include/vcl/virdev.hxx
+++ b/include/vcl/virdev.hxx
@@ -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;
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 1d1ecc98ef27..497e9be6fe39 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -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();
             }

Reply via email to