vcl/inc/unx/salgdi.h | 2 +- vcl/unx/generic/gdi/salvd.cxx | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-)
New commits: commit 2951e2ac0e80fc982cd1fe52a849f40e44da65dc Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Jul 22 11:00:22 2025 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Jul 22 13:52:59 2025 +0200 tdf#167630 "assert !bAlphaMaskTransparent" with gen VCL plugin regression from commit 088a7c7c451321a800ca8d3523a18b6bb93239b7 Author: Noel Grandin <noelgran...@gmail.com> Date: Tue Sep 24 16:18:11 2024 +0200 remove alpha device from OutputDevice Change-Id: I2b38b4d714bca66df0c3bd6a40fcbcb1cddb778c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188140 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index d5774a3494b2..fb7619801d08 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -70,7 +70,7 @@ public: void Init(X11SalFrame& rFrame, Drawable aDrawable, SalX11Screen nXScreen); void Init(X11SalVirtualDevice *pVirtualDevice, SalColormap* pColormap = nullptr, - bool bDeleteColormap = false); + bool bDeleteColormap = false, bool bAlphaMaskTransparent = false); void Init( X11SkiaSalVirtualDevice *pVirtualDevice ); virtual SalGraphicsImpl* GetImpl() const override; diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx index 3581a43a8ab8..bd9756bd44f3 100644 --- a/vcl/unx/generic/gdi/salvd.cxx +++ b/vcl/unx/generic/gdi/salvd.cxx @@ -73,7 +73,7 @@ std::unique_ptr<SalVirtualDevice> X11SalInstance::CreateVirtualDevice(SalGraphic return CreateX11VirtualDevice(rGraphics, nDX, nDY, eFormat, rData, std::make_unique<X11SalGraphics>()); } -void X11SalGraphics::Init(X11SalVirtualDevice *pDevice, SalColormap* pColormap, bool bDeleteColormap) +void X11SalGraphics::Init(X11SalVirtualDevice *pDevice, SalColormap* pColormap, bool bDeleteColormap, bool bAlphaMaskTransparent) { SalDisplay *pDisplay = pDevice->GetDisplay(); m_nXScreen = pDevice->GetXScreenNumber(); @@ -100,6 +100,12 @@ void X11SalGraphics::Init(X11SalVirtualDevice *pDevice, SalColormap* pColormap, SetDrawable(pDevice->GetDrawable(), pDevice->GetSurface(), m_nXScreen); mxImpl->UpdateX11GeometryProvider(); + + if (bAlphaMaskTransparent) + { + mxImpl->SetFillColor(COL_TRANSPARENT); + mxImpl->drawRect(0, 0, pDevice->GetWidth(), pDevice->GetHeight()); + } } X11SalVirtualDevice::X11SalVirtualDevice(const SalGraphics& rGraphics, tools::Long nDX, tools::Long nDY, @@ -232,7 +238,6 @@ void X11SalVirtualDevice::ReleaseGraphics( SalGraphics* ) bool X11SalVirtualDevice::SetSize( tools::Long nDX, tools::Long nDY, bool bAlphaMaskTransparent ) { - assert(!bAlphaMaskTransparent && "TODO"); (void)bAlphaMaskTransparent; if( bExternPixmap_ ) return false; @@ -282,7 +287,7 @@ bool X11SalVirtualDevice::SetSize( tools::Long nDX, tools::Long nDY, bool bAlpha } if( pGraphics_ ) - pGraphics_->Init( this ); + pGraphics_->Init( this, nullptr, false, bAlphaMaskTransparent ); return true; }