summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-07-13 07:52:51 +0200
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-07-13 07:54:09 +0200
commitdde00f1f8ac598314b7f8a787eeacc841bc65f1c (patch)
treec8d6bb18995fd63fd4f30dc03133ede42ee8ac87 /chart2
parent47a82452b5040cd712ffafb7d153fd18940ee1af (diff)
make threaded rendering work correctly, fdo#81110
The context may only be bound in one thread! Change-Id: Ibb67f88c2f11fd48884ee39d89620193e4e5471b
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/charttypes/GL3DBarChart.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 8ce235fb9dae..540615b44f7c 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -407,6 +407,7 @@ void GL3DBarChart::update()
Size aSize = mrWindow.GetSizePixel();
mrWindow.getContext().setWinSize(aSize);
mpRenderThread = rtl::Reference<RenderThread>(new RenderOneFrameThread(this));
+ mrWindow.getContext().resetCurrent();
mpRenderThread->launch();
}
@@ -441,6 +442,7 @@ void GL3DBarChart::moveToDefault()
Size aSize = mrWindow.GetSizePixel();
mrWindow.getContext().setWinSize(aSize);
mpRenderThread = rtl::Reference<RenderThread>(new RenderAnimationThread(this, maCameraPosition, maDefaultCameraPosition, STEPS));
+ mrWindow.getContext().resetCurrent();
mpRenderThread->launch();
/*
@@ -498,6 +500,7 @@ void GL3DBarChart::clickedAt(const Point& rPos, sal_uInt16 nButtons)
Size aSize = mrWindow.GetSizePixel();
mrWindow.getContext().setWinSize(aSize);
mpRenderThread = rtl::Reference<RenderThread>(new RenderAnimationThread(this, maCameraPosition, maTargetPosition, STEPS));
+ mrWindow.getContext().resetCurrent();
mpRenderThread->launch();
/*
@@ -579,6 +582,7 @@ void GL3DBarChart::moveToCorner()
mrWindow.getContext().setWinSize(aSize);
mpRenderThread = rtl::Reference<RenderThread>(new RenderAnimationThread(this, getCornerPosition(mnCornerId),
maCameraPosition, STEPS));
+ mrWindow.getContext().resetCurrent();
mpRenderThread->launch();
// TODO: moggi: add to thread