Kaydet (Commit) 7df94869 authored tarafından Caolán McNamara's avatar Caolán McNamara

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/36948Tested-by: 's avatarJenkins <ci@libreoffice.org>
Tested-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 2c8a9d8a
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment