[Libreoffice-commits] core.git: chart2/source

Michael Meeks michael.meeks at collabora.com
Mon Sep 29 12:51:07 PDT 2014


 chart2/source/view/charttypes/GL3DBarChart.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit ca537697804c22eeed1b52b2540e9d02c7cdebed
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Mon Sep 29 20:49:36 2014 +0100

    chart2: take the mutex to update the chart structures.
    
    Change-Id: I8ee6ec81913c008eeb67cd70a2490b523b0d8177

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 45aa0b3..ea3c084 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();


More information about the Libreoffice-commits mailing list