chart2/source/view/charttypes/GL3DBarChart.cxx |    7 ++-----
 chart2/source/view/inc/GL3DBarChart.hxx        |    2 +-
 2 files changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 7c1686a6e493cec75e77fa6647c33b537e493457
Author: Kohei Yoshida <kohei.yosh...@collabora.com>
Date:   Tue Sep 23 13:52:24 2014 -0400

    Some cleanup on Timer.
    
    Use a different name for handler as 'updateTimer' is also used as
    a method name within the same class.  Also no need to set the interval
    repeatedly & no need to stop the timer when it times out.
    
    Change-Id: I430bc26b945d179c87310eaefd9d94986192841c

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx 
b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 625ee69..05738d7 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -561,7 +561,7 @@ GL3DBarChart::GL3DBarChart(
             mbAutoFly = atoi(aAutoFly);
         }
         maTimer.SetTimeout(DATA_UPDATE_TIME);
-        maTimer.SetTimeoutHdl(LINK(this, GL3DBarChart, updateTimer));
+        maTimer.SetTimeoutHdl(LINK(this, GL3DBarChart, UpdateTimerHdl));
         maTimer.Start();
         osl_getSystemTime(&maFPSRenderStartTime);
         osl_getSystemTime(&maFPSRenderEndTime);
@@ -1474,11 +1474,9 @@ void GL3DBarChart::processAutoFly(sal_uInt32 nId, 
sal_uInt32 nColor)
     }
 }
 
-IMPL_LINK_NOARG(GL3DBarChart, updateTimer)
+IMPL_LINK_NOARG(GL3DBarChart, UpdateTimerHdl)
 {
-    maTimer.Stop();
     updateScreenText();
-    maTimer.SetTimeout(DATA_UPDATE_TIME);
     maTimer.Start();
     return 0;
 }
diff --git a/chart2/source/view/inc/GL3DBarChart.hxx 
b/chart2/source/view/inc/GL3DBarChart.hxx
index 30607e6..79d816d 100644
--- a/chart2/source/view/inc/GL3DBarChart.hxx
+++ b/chart2/source/view/inc/GL3DBarChart.hxx
@@ -101,7 +101,7 @@ private:
     void updateScreenText();
     void updateRenderFPS();
     void updateDataUpdateFPS();
-    DECL_LINK(updateTimer, void*);
+    DECL_LINK(UpdateTimerHdl, void*);
     int calcTimeInterval(TimeValue &startTime, TimeValue &endTime);
     float addScreenTextShape(OUString &nStr, glm::vec2 aLeftOrRightTop, float 
nTextHeight, bool bLeftTopFlag = true,
                                   const glm::vec4& rColor = glm::vec4(0.0f, 
1.0f, 1.0f, 0.0f),
commit 3a4f5b47222a399d0745c4ae5eb000f4e75a7041
Author: Kohei Yoshida <kohei.yosh...@collabora.com>
Date:   Tue Sep 23 13:46:23 2014 -0400

    This guard blocks main loop.
    
    And I've been told that by design the main thread doesn't need to be
    aware of the rendering threads, so no need to take mutex here.
    
    Change-Id: I78ec348ccc28dd67284ecdfccebb915cc1942fa8

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx 
b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 5a05323..625ee69 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -1176,7 +1176,6 @@ int GL3DBarChart::calcTimeInterval(TimeValue &startTime, 
TimeValue &endTime)
 void GL3DBarChart::updateScreenText()
 {
     SharedResourceAccess(maCond1, maCond2);
-    osl::MutexGuard aGuard(maMutex);
     maScreenTextShapes.clear();
     mpRenderer->ReleaseScreenTextShapes();
     updateRenderFPS();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to