vcl/inc/unx/salgdi.h | 1 vcl/unx/generic/gdi/salgdi.cxx | 5 ++ vcl/unx/generic/window/salframe.cxx | 73 +----------------------------------- 3 files changed, 10 insertions(+), 69 deletions(-)
New commits: commit da1d655b56ccc7fe5204770e3eb3df208f79947d Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Thu Aug 26 12:04:18 2021 +0900 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Thu Aug 26 12:04:36 2021 +0900 X11SalGraphics using SvpGraphicsBackend Change-Id: I1370cf5235752adb8082ac8c664e0bf3dccd41b3 diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index 41e0f57598c8..a273a53caa55 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -311,6 +311,7 @@ private: bool bWindow_ : 1; // is Window bool bVirDev_ : 1; // is VirDev + bool m_bCairoBackend : 1; bool m_bSkia : 1; private: diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index e809923fb3bd..0d840c0d3584 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -75,6 +75,7 @@ X11SalGraphics::X11SalGraphics(): hBrush_(None), bWindow_(false), bVirDev_(false), + m_bCairoBackend(false), m_bSkia(SkiaHelper::isVCLSkiaEnabled()) { #if HAVE_FEATURE_SKIA @@ -85,6 +86,10 @@ X11SalGraphics::X11SalGraphics(): } else #endif + if (m_bCairoBackend) + { + } + else { mxTextRenderImpl.reset(new X11CairoTextRender(*this)); mxImpl.reset(new X11SalGraphicsImpl(*this)); diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index a47ed1c645fa..626dc66f85e8 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -282,76 +282,11 @@ static void CreateNetWmAppIcon( sal_uInt16 nIcon, NetWmIconData& netwm_icon ) netwm_icon.resize( pos ); } -static bool lcl_SelectAppIconPixmap( SalDisplay const *pDisplay, SalX11Screen nXScreen, - sal_uInt16 nIcon, sal_uInt16 iconSize, - Pixmap& icon_pixmap, Pixmap& icon_mask, NetWmIconData& netwm_icon) +static bool lcl_SelectAppIconPixmap( SalDisplay const * /*pDisplay*/, SalX11Screen /*nXScreen*/, + sal_uInt16 /*nIcon*/, sal_uInt16 /*iconSize*/, + Pixmap& /*icon_pixmap*/, Pixmap& /*icon_mask*/, NetWmIconData& /*netwm_icon*/) { - CreateNetWmAppIcon( nIcon, netwm_icon ); - - OUString sIcon; - - if( iconSize >= 48 ) - sIcon = SV_ICON_SIZE48[nIcon]; - else if( iconSize >= 32 ) - sIcon = SV_ICON_SIZE32[nIcon]; - else if( iconSize >= 16 ) - sIcon = SV_ICON_SIZE16[nIcon]; - else - return false; - - BitmapEx aIcon = vcl::bitmap::loadFromName(sIcon, ImageLoadFlags::IgnoreScalingFactor); - - if( aIcon.IsEmpty() ) - return false; - - X11SalBitmap *pBitmap = dynamic_cast < X11SalBitmap * > - (aIcon.ImplGetBitmapSalBitmap().get()); - if (!pBitmap) // FIXME: opengl , TODO SKIA - return false; - - icon_pixmap = XCreatePixmap( pDisplay->GetDisplay(), - pDisplay->GetRootWindow( nXScreen ), - iconSize, iconSize, - DefaultDepth( pDisplay->GetDisplay(), - nXScreen.getXScreen() ) - ); - - SalTwoRect aRect(0, 0, iconSize, iconSize, 0, 0, iconSize, iconSize); - - pBitmap->ImplDraw( icon_pixmap, - nXScreen, - DefaultDepth( pDisplay->GetDisplay(), - nXScreen.getXScreen() ), - aRect, - DefaultGC( pDisplay->GetDisplay(), - nXScreen.getXScreen() ) ); - - icon_mask = None; - - if( aIcon.IsAlpha() ) - { - icon_mask = XCreatePixmap( pDisplay->GetDisplay(), - pDisplay->GetRootWindow( pDisplay->GetDefaultXScreen() ), - iconSize, iconSize, 1); - - XGCValues aValues; - aValues.foreground = 0xffffffff; - aValues.background = 0; - aValues.function = GXcopy; - GC aMonoGC = XCreateGC( pDisplay->GetDisplay(), icon_mask, - GCFunction|GCForeground|GCBackground, &aValues ); - - Bitmap aMask = aIcon.GetAlpha(); - aMask.Invert(); - - X11SalBitmap *pMask = static_cast < X11SalBitmap * > - (aMask.ImplGetSalBitmap().get()); - - pMask->ImplDraw(icon_mask, nXScreen, 1, aRect, aMonoGC); - XFreeGC( pDisplay->GetDisplay(), aMonoGC ); - } - - return true; + return false; } void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen, SystemParentData const * pParentData, bool bUseGeometry )