Commit 37886930 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

introducing RW-mutexes to sigslot

parent 92286e15
......@@ -96,7 +96,6 @@ namespace campvis {
void Geometry1DTransferFunctionEditor::paint() {
Geometry1DTransferFunction* gtf = static_cast<Geometry1DTransferFunction*>(_transferFunction);
gtf->lock();
const std::vector<TFGeometry1D*>& geometries = gtf->getGeometries();
const tgt::vec2& intensityDomain = gtf->getIntensityDomain();
......@@ -114,8 +113,11 @@ namespace campvis {
LGL_ERROR;
// renderIntoEditor TF geometries
for (std::vector<TFGeometry1D*>::const_iterator it = geometries.begin(); it != geometries.end(); ++it) {
(*it)->renderIntoEditor();
{
tbb::mutex::scoped_lock lock(_localMutex);
for (std::vector<TFGeometry1D*>::const_iterator it = geometries.begin(); it != geometries.end(); ++it) {
(*it)->renderIntoEditor();
}
}
// render histogram if existent
......@@ -186,8 +188,6 @@ namespace campvis {
LGL_ERROR;
glPopAttrib();
gtf->unlock();
}
void Geometry1DTransferFunctionEditor::sizeChanged(const tgt::ivec2& size) {
......
......@@ -92,7 +92,6 @@ namespace campvis {
void Geometry2DTransferFunctionEditor::paint() {
Geometry2DTransferFunction* gtf = static_cast<Geometry2DTransferFunction*>(_transferFunction);
gtf->lock();
const std::vector<TFGeometry2D*>& geometries = gtf->getGeometries();
const tgt::vec2& intensityDomain = gtf->getIntensityDomain();
......@@ -110,8 +109,11 @@ namespace campvis {
LGL_ERROR;
// renderIntoEditor TF geometries
for (std::vector<TFGeometry2D*>::const_iterator it = geometries.begin(); it != geometries.end(); ++it) {
(*it)->render();
{
tbb::mutex::scoped_lock lock(_localMutex);
for (std::vector<TFGeometry2D*>::const_iterator it = geometries.begin(); it != geometries.end(); ++it) {
(*it)->render();
}
}
// render histogram if existent
......@@ -173,8 +175,6 @@ namespace campvis {
LGL_ERROR;
glPopAttrib();
gtf->unlock();
}
void Geometry2DTransferFunctionEditor::sizeChanged(const tgt::ivec2& size) {
......
This diff is collapsed.
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