[Libreoffice-commits] core.git: chart2/source
Caolán McNamara
caolanm at redhat.com
Wed Apr 26 07:54:17 UTC 2017
chart2/source/view/charttypes/GL3DBarChart.cxx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 7df948695e5be0077fd9d7d8bc8e25072c345890
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Apr 25 15:07:54 2017 +0100
Resolves: tdf#107372 set opengl context when using opengl functions
even if they are teardown ones
Change-Id: Ie222d3ffb2b555c0013d7346552d3fc76ec87d9b
Reviewed-on: https://gerrit.libreoffice.org/36948
Tested-by: Jenkins <ci at libreoffice.org>
Tested-by: Julien Nabet <serval2412 at yahoo.fr>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 0f96e878bb04..8c547b99e90c 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -592,8 +592,13 @@ GL3DBarChart::~GL3DBarChart()
joinRenderThread();
- if(mbValidContext)
+ if (mbValidContext)
+ {
mpWindow->setRenderer(nullptr);
+ mpWindow->getContext().makeCurrent();
+ mpRenderer.reset();
+ mpWindow->getContext().resetCurrent();
+ }
}
void GL3DBarChart::create3DShapes(const std::vector<std::unique_ptr<VDataSeries> >& rDataSeriesContainer,
@@ -1123,6 +1128,9 @@ void GL3DBarChart::contextDestroyed()
{
SharedResourceAccess aResGuard(maCond1, maCond2);
osl::MutexGuard aGuard(maMutex);
+ mpWindow->getContext().makeCurrent();
+ mpRenderer.reset();
+ mpWindow->getContext().resetCurrent();
mbValidContext = false;
}
More information about the Libreoffice-commits
mailing list