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:
authorTon Roosendaal <ton@blender.org>2011-01-02 22:46:32 +0300
committerTon Roosendaal <ton@blender.org>2011-01-02 22:46:32 +0300
commit05cfe50436a97b45c36e3a044faaf15c266066c0 (patch)
tree9ab8c1ea122982be6da802615af96694c2d1193a /source/blender/windowmanager/intern/wm_jobs.c
parent5d6c76c6a3914ce26d6584b96568e9647aa7d991 (diff)
Bugfix #25446 (and todo item)
The icons for materials were always lagging or not updating at all. I also found it suspicious slow... It appeared that the icons now store a "mip level", where for every change in Materials 2 render jobs for icons were started, one for 32x32 pix, one for 96x96. The latter was cancelling out the first job almost always. Also made preview renders detect size, to set amount of tiles to be rendered. Small icons use 1 part, larger previews 16 now. All in all, behaves much smoother now! But, will also update the thread Jobs manager to allow "delayed jobs" like for icons, these are aggressively put as first in the jobs list.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_jobs.c')
-rw-r--r--source/blender/windowmanager/intern/wm_jobs.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c
index 41b206f5479..b8dfae63b4d 100644
--- a/source/blender/windowmanager/intern/wm_jobs.c
+++ b/source/blender/windowmanager/intern/wm_jobs.c
@@ -283,6 +283,7 @@ void WM_jobs_start(wmWindowManager *wm, wmJob *steve)
if(steve->running) {
/* signal job to end and restart */
steve->stop= 1;
+ // printf("job started a running job, ending... %s\n", steve->name);
}
else {
if(steve->customdata && steve->startjob) {
@@ -304,10 +305,10 @@ void WM_jobs_start(wmWindowManager *wm, wmJob *steve)
steve->ready= 0;
steve->progress= 0.0;
+ // printf("job started: %s\n", steve->name);
+
BLI_init_threads(&steve->threads, do_job_thread, 1);
BLI_insert_thread(&steve->threads, steve);
-
- // printf("job started: %s\n", steve->name);
}
/* restarted job has timer already */
@@ -431,8 +432,8 @@ void wm_jobs_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt)
steve->run_customdata= NULL;
steve->run_free= NULL;
- // if(steve->stop) printf("job stopped\n");
- // else printf("job finished\n");
+ // if(steve->stop) printf("job ready but stopped %s\n", steve->name);
+ // else printf("job finished %s\n", steve->name);
steve->running= 0;
BLI_end_threads(&steve->threads);
@@ -444,6 +445,7 @@ void wm_jobs_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt)
/* new job added for steve? */
if(steve->customdata) {
+ // printf("job restarted with new data %s\n", steve->name);
WM_jobs_start(wm, steve);
}
else {