From: dooglus Date: Mon, 14 Jan 2008 10:28:41 +0000 (+0000) Subject: Use a mutex to prevent the two render threads (rendering the workarea and the navigat... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=1a5b665468b32fc50f15b381dbc4964600428e38;p=synfig.git Use a mutex to prevent the two render threads (rendering the workarea and the navigator dialog thumbnail) trampling on each other while rendering the Duplicate layer. git-svn-id: http://svn.voria.com/code@1358 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/layer_duplicate.cpp b/synfig-core/trunk/src/synfig/layer_duplicate.cpp index 6577237..32b9baa 100644 --- a/synfig-core/trunk/src/synfig/layer_duplicate.cpp +++ b/synfig-core/trunk/src/synfig/layer_duplicate.cpp @@ -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 { diff --git a/synfig-core/trunk/src/synfig/layer_duplicate.h b/synfig-core/trunk/src/synfig/layer_duplicate.h index 6d74c18..3c29b23 100644 --- a/synfig-core/trunk/src/synfig/layer_duplicate.h +++ b/synfig-core/trunk/src/synfig/layer_duplicate.h @@ -42,6 +42,7 @@ class Layer_Duplicate : public synfig::Layer_Composite private: mutable Real index; mutable Time time_cur; + mutable synfig::Mutex mutex; public: