chart2/source/view/charttypes/GL3DBarChart.cxx | 29 +++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-)
New commits: commit efea971d33d83b39bcb883da51cc204a981897f9 Author: Markus Mohrhard <[email protected]> Date: Wed Jul 23 22:57:17 2014 +0200 by default we want the non-benchmark mode Change-Id: I82c8d0c36f1748158545a2bfa5b816c5bb9d44f0 diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index d681c33..7d3ffd5 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -24,7 +24,7 @@ #include <windows.h> #endif -#define BENCH_MARK_MODE 1 +#define BENCH_MARK_MODE 0 using namespace com::sun::star; commit bffb6ccc133987dcb11d0b9ac7135fdc7430c49b Author: Markus Mohrhard <[email protected]> Date: Wed Jul 23 22:56:24 2014 +0200 that mutex is not necessary The join makes sure that the thread is not running anymore Change-Id: I3f900e36833240544005d03ce1ae1f2330365a03 diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index c5526b1..d681c33 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -223,9 +223,10 @@ GL3DBarChart::~GL3DBarChart() osl::MutexGuard aGuard(maMutex); mbRenderDie = true; } + if(mpRenderThread.is()) mpRenderThread->join(); - osl::MutexGuard aGuard(maMutex); + if(mbValidContext) mrWindow.setRenderer(NULL); } commit 5e72b7b77e77561fe965b0c5a3446d4fdb99503f Author: Markus Mohrhard <[email protected]> Date: Wed Jul 23 22:54:31 2014 +0200 fix one more deadlock Change-Id: I1e8e24735f6a57982834f84b26042b7082fa4410 diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 16ace23..c5526b1 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -669,10 +669,11 @@ void GL3DBarChart::moveToCorner() return; } - osl::MutexGuard aGuard(maMutex); if(mpRenderThread.is()) mpRenderThread->join(); + osl::MutexGuard aGuard(maMutex); + Size aSize = mrWindow.GetSizePixel(); mrWindow.getContext().setWinSize(aSize); mpRenderThread = rtl::Reference<RenderThread>(new RenderAnimationThread(this, getCornerPosition(mnCornerId), commit 453aeef36c8455ecbb5ef4e58109b4610d5ba243 Author: Markus Mohrhard <[email protected]> Date: Wed Jul 23 22:54:00 2014 +0200 avoid deadlocks in BENCHMARK_MODE Change-Id: I1f994ecb6efbd302430062421ccc953dee904741 diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index e3aef22..16ace23 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -509,6 +509,12 @@ public: void GL3DBarChart::moveToDefault() { + if(BENCH_MARK_MODE) + { + // add correct handling here!! + return; + } + if(mpRenderThread.is()) mpRenderThread->join(); @@ -540,6 +546,12 @@ void GL3DBarChart::clickedAt(const Point& rPos, sal_uInt16 nButtons) if(nButtons != MOUSE_LEFT) return; + if (BENCH_MARK_MODE) + { + // add correct handling here !! + return; + } + sal_uInt32 nId = 5; { PickingModeSetter aPickingModeSetter(mpRenderer.get()); @@ -592,6 +604,7 @@ void GL3DBarChart::render() { if (BENCH_MARK_MODE) return; + osl::MutexGuard aGuard(maMutex); update(); } @@ -650,6 +663,12 @@ glm::vec3 GL3DBarChart::getCornerPosition(sal_Int8 nId) void GL3DBarChart::moveToCorner() { + if(BENCH_MARK_MODE) + { + // add correct handling here!! + return; + } + osl::MutexGuard aGuard(maMutex); if(mpRenderThread.is()) mpRenderThread->join(); commit 96f373e26ca4632c15dfcb30b14d92714c484313 Author: Markus Mohrhard <[email protected]> Date: Wed Jul 23 22:49:17 2014 +0200 avoid deadlock in 3D charts taking the mutex before calling join is silly Change-Id: I5a2df82f748aa7ccd13824369da5c81842285076 diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 733d46f..e3aef22 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -509,10 +509,10 @@ public: void GL3DBarChart::moveToDefault() { - osl::MutexGuard aGuard(maMutex); if(mpRenderThread.is()) mpRenderThread->join(); + osl::MutexGuard aGuard(maMutex); Size aSize = mrWindow.GetSizePixel(); mrWindow.getContext().setWinSize(aSize); mpRenderThread = rtl::Reference<RenderThread>(new RenderAnimationThread(this, maCameraPosition, maDefaultCameraPosition, STEPS)); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
