From 915df5081761709fdfc5ed8ad34ea337802aa0d0 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sat, 29 May 2004 10:39:32 +0000
Subject: [PATCH] removed the locks: I'll re-add them if I actually see a
 problem...

---
 Graphics/Mesh.cpp |  6 ++----
 Graphics/Post.cpp | 10 ++++------
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/Graphics/Mesh.cpp b/Graphics/Mesh.cpp
index 3aa0f8b145..b20676131e 100644
--- a/Graphics/Mesh.cpp
+++ b/Graphics/Mesh.cpp
@@ -1,4 +1,4 @@
-// $Id: Mesh.cpp,v 1.89 2004-05-29 10:11:12 geuzaine Exp $
+// $Id: Mesh.cpp,v 1.90 2004-05-29 10:39:32 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -229,8 +229,7 @@ void Draw_Mesh_Surface(void *a, void *b)
   if(!(s->Visible & VIS_MESH))
     return;
 
-  if(CTX.mesh.vertex_arrays && Tree_Nbr(s->Simplexes) && !CTX.threads_lock){
-    CTX.threads_lock = 1;
+  if(CTX.mesh.vertex_arrays && Tree_Nbr(s->Simplexes)){
     if(CTX.mesh.changed){
       Msg(DEBUG, "regenerate mesh vertex array");
       if(s->vertexArray) delete s->vertexArray;
@@ -243,7 +242,6 @@ void Draw_Mesh_Surface(void *a, void *b)
     }
     if(s->vertexArray && useTheVertexArray)
       Draw_Mesh_Triangle_Array(s->vertexArray);
-    CTX.threads_lock = 0;
   }
     
   fillTheVertexArray = 0; // just to make sure...
diff --git a/Graphics/Post.cpp b/Graphics/Post.cpp
index 6eacb485c5..91904f400a 100644
--- a/Graphics/Post.cpp
+++ b/Graphics/Post.cpp
@@ -1,4 +1,4 @@
-// $Id: Post.cpp,v 1.61 2004-05-29 10:11:12 geuzaine Exp $
+// $Id: Post.cpp,v 1.62 2004-05-29 10:39:32 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -247,7 +247,7 @@ void Draw_ScalarList(Post_View * v, double ValMin, double ValMax,
       // we might save some normal stuff by checking if the change
       // actually changed the "geometry"... Should put e.g. Change=2
       // if timestep changed, etc.
-      Msg(DEBUG, "Preprocessing of normals in view %d", v->Num);
+      Msg(DEBUG, "Preprocessing of normals in View[%d]", v->Index);
       for(i = 0; i < List_Nbr(list); i += nb) {
         Get_Coords(v->Explode, v->Offset, nbnod,
                    (double *)List_Pointer_Fast(list, i),
@@ -456,10 +456,9 @@ void Draw_Post(void)
       for(int p = 0; p < 2; p++){ // two-passes for vertex arrays
 	int skip_2d = 0, skip_3d = 0;
 	if(p == 0){
-	  if(CTX.post.vertex_arrays && !CTX.threads_lock){
-	    CTX.threads_lock = 1;
+	  if(CTX.post.vertex_arrays){
 	    if(v->Changed){
-	      Msg(DEBUG, "regenerate View[%d] vertex array", v->Num);
+	      Msg(DEBUG, "regenerate View[%d] vertex array", v->Index);
 	      if(v->VertexArray) delete v->VertexArray;
 	      v->VertexArray = new triangleVertexArray(10000);
 	      v->FillVertexArray = 1;
@@ -522,7 +521,6 @@ void Draw_Post(void)
       pass2:
 	v->FillVertexArray = 0;
 	v->UseVertexArray = 0;
-	CTX.threads_lock = 0;
       }
 
       if(CTX.post.vertex_arrays && v->VertexArray){
-- 
GitLab