summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-11-18 19:43:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-11-18 20:51:52 +0100
commit09de897e579a4c21de6bac37077cad7d8a19a9c2 (patch)
tree7ff9d9d21c236cdaead4dd48880c41654184ff8f /vcl
parente4a6ca79beba1f3d3e7106e7080fa04cbc12c421 (diff)
simplify X11SalGraphics::DeInit
it is always called in the destructor, so lets just centralise the logic here Change-Id: I8c9b204d147315b6693fa7a08f759b53b9a6a17c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176731 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/unx/salgdi.h1
-rw-r--r--vcl/unx/generic/gdi/salgdi.cxx9
-rw-r--r--vcl/unx/generic/window/salframe.cxx13
3 files changed, 4 insertions, 19 deletions
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index 58c273e576b2..35bbb00eebc4 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -84,7 +84,6 @@ public:
void Init(X11SalVirtualDevice *pVirtualDevice, SalColormap* pColormap = nullptr,
bool bDeleteColormap = false);
void Init( X11SkiaSalVirtualDevice *pVirtualDevice );
- void DeInit();
virtual SalGraphicsImpl* GetImpl() const override;
SalGeometryProvider* GetGeometryProvider() const;
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 0e17f8e16ac4..e765919d6528 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -88,7 +88,8 @@ X11SalGraphics::X11SalGraphics():
X11SalGraphics::~X11SalGraphics() COVERITY_NOEXCEPT_FALSE
{
- DeInit();
+ mxImpl->DeInit();
+ SetDrawable(None, nullptr, m_nXScreen);
ReleaseFonts();
FreeColorMap();
}
@@ -145,12 +146,6 @@ void X11SalGraphics::Init( X11SalFrame& rFrame, Drawable aTarget,
mxImpl->Init();
}
-void X11SalGraphics::DeInit()
-{
- mxImpl->DeInit();
- SetDrawable(None, nullptr, m_nXScreen);
-}
-
void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // const
{
char* pForceDpi;
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index a784061af6f0..dbd35f5417d9 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -815,17 +815,8 @@ X11SalFrame::~X11SalFrame()
doReparentPresentationDialogues( GetDisplay() );
}
- if( pGraphics_ )
- {
- pGraphics_->DeInit();
- pGraphics_.reset();
- }
-
- if( pFreeGraphics_ )
- {
- pFreeGraphics_->DeInit();
- pFreeGraphics_.reset();
- }
+ pGraphics_.reset();
+ pFreeGraphics_.reset();
// reset all OpenGL contexts using this window
rtl::Reference<OpenGLContext> pContext = ImplGetSVData()->maGDIData.mpLastContext;