Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-04-16 10:48:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-16 10:48:57 +0400
commit0635f8101c98d74da729d464472a4d9efa09337f (patch)
tree2588585adbcd09b0e14497d12a8403488bfe2efb /source/blender/editors/uvedit
parentfb1e60762f3a4c32b3ae57824f5bcbb984b33cbc (diff)
make scanfill threadsafe (wasnt threadsafe before BMesh merge but before the merge it didn't need to be) - now rendering uses its better if its threadsafe.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index e51b119253f..5b3c4f9cd97 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -186,6 +186,7 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
short implicit, short fill, short sel,
short correct_aspect)
{
+ ScanFillContext sf_ctx;
ParamHandle *handle;
BMFace *efa;
BMLoop *l;
@@ -261,13 +262,13 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
}
else {
/* ngon - scanfill time! */
- BLI_begin_edgefill();
+ BLI_begin_edgefill(&sf_ctx);
firstv = lastv = NULL;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
int i;
- v = BLI_addfillvert(l->v->co);
+ v = BLI_addfillvert(&sf_ctx, l->v->co);
/* add small random offset */
for (i = 0; i < 3; i++) {
@@ -277,7 +278,7 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
v->tmp.p = l;
if (lastv) {
- BLI_addfilledge(lastv, v);
+ BLI_addfilledge(&sf_ctx, lastv, v);
}
lastv = v;
@@ -285,10 +286,10 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
firstv = v;
}
- BLI_addfilledge(firstv, v);
+ BLI_addfilledge(&sf_ctx, firstv, v);
- BLI_edgefill(TRUE);
- for (sefa = fillfacebase.first; sefa; sefa = sefa->next) {
+ BLI_edgefill(&sf_ctx, TRUE);
+ for (sefa = sf_ctx.fillfacebase.first; sefa; sefa = sefa->next) {
ls[0] = sefa->v1->tmp.p;
ls[1] = sefa->v2->tmp.p;
ls[2] = sefa->v3->tmp.p;
@@ -305,7 +306,7 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
param_face_add(handle, key, 3, vkeys, co, uv, pin, select);
}
- BLI_end_edgefill();
+ BLI_end_edgefill(&sf_ctx);
}
}