diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-16 10:48:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-16 10:48:57 +0400 |
commit | 0635f8101c98d74da729d464472a4d9efa09337f (patch) | |
tree | 2588585adbcd09b0e14497d12a8403488bfe2efb /source/blender/windowmanager | |
parent | fb1e60762f3a4c32b3ae57824f5bcbb984b33cbc (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/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_gesture.c | 15 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 4 |
2 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c index efc22f95cbc..0add9106872 100644 --- a/source/blender/windowmanager/intern/wm_gesture.c +++ b/source/blender/windowmanager/intern/wm_gesture.c @@ -230,12 +230,13 @@ static void wm_gesture_draw_circle(wmGesture *gt) static void draw_filled_lasso(wmGesture *gt) { + ScanFillContext sf_ctx; ScanFillVert *v = NULL, *lastv = NULL, *firstv = NULL; ScanFillFace *efa; short *lasso = (short *)gt->customdata; int i; - BLI_begin_edgefill(); + BLI_begin_edgefill(&sf_ctx); for (i = 0; i < gt->points; i++, lasso += 2) { float co[3]; @@ -243,22 +244,22 @@ static void draw_filled_lasso(wmGesture *gt) co[1] = (float)lasso[1]; co[2] = 0.0f; - v = BLI_addfillvert(co); + v = BLI_addfillvert(&sf_ctx, co); if (lastv) - /* e = */ /* UNUSED */ BLI_addfilledge(lastv, v); + /* e = */ /* UNUSED */ BLI_addfilledge(&sf_ctx, lastv, v); lastv = v; if (firstv == NULL) firstv = v; } /* highly unlikely this will fail, but could crash if (gt->points == 0) */ if (firstv) { - BLI_addfilledge(firstv, v); - BLI_edgefill(FALSE); + BLI_addfilledge(&sf_ctx, firstv, v); + BLI_edgefill(&sf_ctx, FALSE); glEnable(GL_BLEND); glColor4f(1.0, 1.0, 1.0, 0.05); glBegin(GL_TRIANGLES); - for (efa = fillfacebase.first; efa; efa = efa->next) { + for (efa = sf_ctx.fillfacebase.first; efa; efa = efa->next) { glVertex2fv(efa->v1->co); glVertex2fv(efa->v2->co); glVertex2fv(efa->v3->co); @@ -266,7 +267,7 @@ static void draw_filled_lasso(wmGesture *gt) glEnd(); glDisable(GL_BLEND); - BLI_end_edgefill(); + BLI_end_edgefill(&sf_ctx); } } diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 39651cea3ab..0c95ccea5d7 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -63,7 +63,7 @@ #include "BKE_tracking.h" /* free tracking clipboard */ #include "BLI_listbase.h" -#include "BLI_scanfill.h" +// #include "BLI_scanfill.h" #include "BLI_string.h" #include "BLI_utildefines.h" @@ -383,8 +383,6 @@ void WM_exit_ext(bContext *C, const short do_python) BLF_exit(); - BLI_scanfill_free(); /* the order this is called doesn't matter */ - #ifdef WITH_INTERNATIONAL BLF_free_unifont(); #endif |