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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-04-01 16:51:24 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-04-01 16:51:24 +0400
commit9822e07be6c02f80955cbc36be3353d1c88b80b4 (patch)
tree25ad4dd91c9408c2c158258cae956a41e1ba95cb /source/blender/editors
parent11e83768661638400bd3a0cd380adc00b67ddc36 (diff)
Attempted fixes for render crashes on windows, still can't redo them here
in a virtual machine, maybe that has some different threading behavior. Also should fix a problem with displaying render passes and multiple slots.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/render/render_internal.c17
-rw-r--r--source/blender/editors/space_image/image_draw.c18
2 files changed, 16 insertions, 19 deletions
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index dcafbc5b252..3f98a340b74 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -129,12 +129,8 @@ void image_buffer_rect_update(Scene *scene, RenderResult *rr, ImBuf *ibuf, volat
}
if(rectf==NULL) return;
- if(ibuf->rect==NULL) {
- BLI_lock_thread(LOCK_CUSTOM1);
- if(ibuf->rect==NULL)
- imb_addrectImBuf(ibuf);
- BLI_unlock_thread(LOCK_CUSTOM1);
- }
+ if(ibuf->rect==NULL)
+ imb_addrectImBuf(ibuf);
rectf+= 4*(rr->rectx*ymin + xmin);
rectc= (char *)(ibuf->rect + ibuf->x*rymin + rxmin);
@@ -505,17 +501,22 @@ static void image_renderinfo_cb(void *rjv, RenderStats *rs)
static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrect)
{
RenderJob *rj= rjv;
+ Image *ima= rj->image;
ImBuf *ibuf;
void *lock;
- ibuf= BKE_image_acquire_ibuf(rj->image, &rj->iuser, &lock);
+ /* only update if we are displaying the slot being rendered */
+ if(ima->render_slot != ima->last_render_slot)
+ return;
+
+ ibuf= BKE_image_acquire_ibuf(ima, &rj->iuser, &lock);
if(ibuf) {
image_buffer_rect_update(rj->scene, rr, ibuf, renrect);
/* make jobs timer to send notifier */
*(rj->do_update)= 1;
}
- BKE_image_release_ibuf(rj->image, lock);
+ BKE_image_release_ibuf(ima, lock);
}
static void render_startjob(void *rjv, short *stop, short *do_update)
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 55bec0740ea..a611ee6f32f 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -77,18 +77,14 @@ static void image_verify_buffer_float(SpaceImage *sima, Image *ima, ImBuf *ibuf,
*/
if(ibuf->rect_float && ibuf->rect==NULL) {
- BLI_lock_thread(LOCK_CUSTOM1);
- if(ibuf->rect_float && ibuf->rect==NULL) {
- if(color_manage) {
- if(ima && ima->source == IMA_SRC_VIEWER)
- ibuf->profile = IB_PROFILE_LINEAR_RGB;
- }
- else
- ibuf->profile = IB_PROFILE_NONE;
-
- IMB_rect_from_float(ibuf);
+ if(color_manage) {
+ if(ima && ima->source == IMA_SRC_VIEWER)
+ ibuf->profile = IB_PROFILE_LINEAR_RGB;
}
- BLI_unlock_thread(LOCK_CUSTOM1);
+ else
+ ibuf->profile = IB_PROFILE_NONE;
+
+ IMB_rect_from_float(ibuf);
}
}