summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2014-09-29 20:49:36 +0100
committerMichael Meeks <michael.meeks@collabora.com>2014-09-29 20:50:50 +0100
commitca537697804c22eeed1b52b2540e9d02c7cdebed (patch)
tree6ac30943f8bdc99a92b77a9c10509e6626e81e58 /chart2
parent65277f994ae25d930c15aebba0ed19f8de0abba1 (diff)
chart2: take the mutex to update the chart structures.
Change-Id: I8ee6ec81913c008eeb67cd70a2490b523b0d8177
Diffstat (limited to 'chart2')
-rwxr-xr-xchart2/source/view/charttypes/GL3DBarChart.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 45aa0b34b74b..ea3c0849fd13 100755
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -128,6 +128,8 @@ void RenderThread::renderFrame()
mpChart->mpWindow->getContext().makeCurrent();
mpChart->renderFrame();
+ // FIXME: SwapBuffers can take a considerable time, it'd be
+ // nice if we didn't hold the chart mutex while doing that.
mpChart->mpWindow->getContext().swapBuffers();
mpChart->mpWindow->getContext().resetCurrent();
}
@@ -1176,6 +1178,7 @@ int GL3DBarChart::calcTimeInterval(TimeValue &startTime, TimeValue &endTime)
void GL3DBarChart::updateScreenText()
{
SharedResourceAccess(maCond1, maCond2);
+ osl::MutexGuard aGuard(maMutex);
maScreenTextShapes.clear();
mpRenderer->ReleaseScreenTextShapes();
updateRenderFPS();