diff options
author | Ton Roosendaal <ton@blender.org> | 2009-01-22 17:59:49 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-01-22 17:59:49 +0300 |
commit | 9cc59fb0c329bb788defe9c56b69d0919caaba96 (patch) | |
tree | f6f1c48441ba6de4f2ff1faf19a0540ce1dc6ba5 /source/blender/render/intern/source/zbuf.c | |
parent | a017982074b3b11fd0157d8d604e02858411db70 (diff) |
2.5
Added WM Jobs manager
- WM can manage threaded jobs for you; just provide a couple
of components to get it work:
- customdata, free callback for it
- timer step, notifier code
- start callback, update callback
- Once started, each job runs an own timer, and will for
every time step check necessary updates, or close the
job when ready.
- No drawing happens in jobs, that's for notifiers!
- Every job stores an owner pointer, and based on this owner
it will prevent multiple jobs to enter the stack.
Instead it will re-use a running job, signal it to stop
and allow caller to re-initialize it even.
- Check new wm_jobs.c for more explanation. Jobs API is still
under construction.
Fun: BLI_addtail(&wm->jobs, steve); :)
Put Node shader previews back using wmJobs
- Preview calculating is now fully threaded (1 thread still)
- Thanks to new event system + notifiers, you can see
previews update even while dragging sliders!
- Currently it only starts when you change a node setting.
Warning: the thread render shares Node data, so don't delete
nodes while it renders! This topic is on the todo to make safe.
Also:
- bug in region initialize (do_versions) showed channel list in
node editor wrong.
- flagged the channel list 'hidden' now, it was really in the
way! This is for later to work on anyway.
- recoded Render API callbacks so it gets handlers passed on,
no globals to use anymore, remember?
- previewrender code gets now so much nicer! Will remove a lot
of stuff from code soon.
Diffstat (limited to 'source/blender/render/intern/source/zbuf.c')
-rw-r--r-- | source/blender/render/intern/source/zbuf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c index 509ac81c58b..b68cecce7bd 100644 --- a/source/blender/render/intern/source/zbuf.c +++ b/source/blender/render/intern/source/zbuf.c @@ -2495,7 +2495,7 @@ void zbuffer_shadow(Render *re, float winmat[][4], LampRen *lar, int *rectz, int } } - if((a & 255)==255 && re->test_break()) + if((a & 255)==255 && re->test_break(re->tbh)) break; } @@ -2544,13 +2544,13 @@ void zbuffer_shadow(Render *re, float winmat[][4], LampRen *lar, int *rectz, int } } - if((a & 255)==255 && re->test_break()) + if((a & 255)==255 && re->test_break(re->tbh)) break; } } } - if(re->test_break()) + if(re->test_break(re->tbh)) break; } @@ -3512,13 +3512,13 @@ static int zbuffer_abuf(RenderPart *pa, APixstr *APixbuf, ListBase *apsmbase, Re } } if((v & 255)==255) - if(R.test_break()) + if(R.test_break(R.tbh)) break; } } } - if(R.test_break()) break; + if(R.test_break(R.tbh)) break; } for(zsample=0; zsample<samples; zsample++) { @@ -4013,7 +4013,7 @@ unsigned short *zbuffer_transp_shade(RenderPart *pa, RenderLayer *rl, float *pas unsigned short *ztramask= NULL, filled; /* looks nicer for calling code */ - if(R.test_break()) + if(R.test_break(R.tbh)) return NULL; if(R.osa>16) { /* MAX_OSA */ @@ -4096,7 +4096,7 @@ unsigned short *zbuffer_transp_shade(RenderPart *pa, RenderLayer *rl, float *pas apstrand= aprectstrand; od= offs; - if(R.test_break()) + if(R.test_break(R.tbh)) break; for(x=pa->disprect.xmin+crop; x<pa->disprect.xmax-crop; x++, ap++, apstrand++, pass+=4, od++) { |