Kaydet (Commit) ca537697 authored tarafından Michael Meeks's avatar Michael Meeks

chart2: take the mutex to update the chart structures.

Change-Id: I8ee6ec81913c008eeb67cd70a2490b523b0d8177
üst 65277f99
...@@ -128,6 +128,8 @@ void RenderThread::renderFrame() ...@@ -128,6 +128,8 @@ void RenderThread::renderFrame()
mpChart->mpWindow->getContext().makeCurrent(); mpChart->mpWindow->getContext().makeCurrent();
mpChart->renderFrame(); 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().swapBuffers();
mpChart->mpWindow->getContext().resetCurrent(); mpChart->mpWindow->getContext().resetCurrent();
} }
...@@ -1176,6 +1178,7 @@ int GL3DBarChart::calcTimeInterval(TimeValue &startTime, TimeValue &endTime) ...@@ -1176,6 +1178,7 @@ int GL3DBarChart::calcTimeInterval(TimeValue &startTime, TimeValue &endTime)
void GL3DBarChart::updateScreenText() void GL3DBarChart::updateScreenText()
{ {
SharedResourceAccess(maCond1, maCond2); SharedResourceAccess(maCond1, maCond2);
osl::MutexGuard aGuard(maMutex);
maScreenTextShapes.clear(); maScreenTextShapes.clear();
mpRenderer->ReleaseScreenTextShapes(); mpRenderer->ReleaseScreenTextShapes();
updateRenderFPS(); updateRenderFPS();
......
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