Use a mutex to prevent the two render threads (rendering the workarea and the navigat...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 14 Jan 2008 10:28:41 +0000 (10:28 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 14 Jan 2008 10:28:41 +0000 (10:28 +0000)
git-svn-id: http://svn.voria.com/code@1358 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/layer_duplicate.cpp
synfig-core/trunk/src/synfig/layer_duplicate.h

index 6577237..32b9baa 100644 (file)
@@ -173,6 +173,7 @@ Layer_Duplicate::accelerated_render(Context context,Surface *surface,int quality
        Color::BlendMethod blend_method(get_blend_method());
        int steps = duplicate_param->count_steps(time_cur);
 
+       Mutex::Lock lock(mutex);
        duplicate_param->reset_index(time_cur);
        do
        {
index 6d74c18..3c29b23 100644 (file)
@@ -42,6 +42,7 @@ class Layer_Duplicate : public synfig::Layer_Composite
 private:
        mutable Real index;
        mutable Time time_cur;
+       mutable synfig::Mutex mutex;
 
 public: