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-03-28 17:45:19 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-03-28 17:45:19 +0400
commit46895ab1f2786c2347d0d42b192197fca6d04bf5 (patch)
tree65545e4cf6feff9d7f1b2059905086ef9d33b7d4 /source/blender
parent95d1d823133f59f71e29200de89d2d15c7f5af89 (diff)
Attempt to fix #21796: render crash on windows after slots commit.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/image.c5
-rw-r--r--source/blender/editors/render/render_internal.c19
-rw-r--r--source/blender/editors/space_image/image_draw.c16
3 files changed, 22 insertions, 18 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index f9352f1ded8..2d582157233 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1948,8 +1948,11 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_
ibuf->x= rres.rectx;
ibuf->y= rres.recty;
- if(ibuf->rect_float!=rectf || rect) /* ensure correct redraw */
+ if(ibuf->rect_float!=rectf || rect) { /* ensure correct redraw */
+ BLI_lock_thread(LOCK_CUSTOM1);
imb_freerectImBuf(ibuf);
+ BLI_unlock_thread(LOCK_CUSTOM1);
+ }
if(rect)
ibuf->rect= rect;
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index bdb93b0e9ae..dcafbc5b252 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -30,30 +30,24 @@
#include "MEM_guardedalloc.h"
-#include "BLI_math.h"
#include "BLI_blenlib.h"
-#include "BLI_editVert.h"
-#include "BLI_dlrbTree.h"
+#include "BLI_math.h"
+#include "BLI_threads.h"
#include "DNA_scene_types.h"
#include "BKE_blender.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
-#include "BKE_customdata.h"
#include "BKE_global.h"
#include "BKE_image.h"
-#include "BKE_idprop.h"
#include "BKE_library.h"
#include "BKE_main.h"
-#include "BKE_mesh.h"
#include "BKE_multires.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_utildefines.h"
-#include "BKE_sound.h"
-#include "BKE_writeavi.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -68,7 +62,6 @@
#include "RNA_access.h"
#include "RNA_define.h"
-
#include "wm_window.h"
#include "render_intern.h"
@@ -136,8 +129,12 @@ void image_buffer_rect_update(Scene *scene, RenderResult *rr, ImBuf *ibuf, volat
}
if(rectf==NULL) return;
- if(ibuf->rect==NULL)
- imb_addrectImBuf(ibuf);
+ if(ibuf->rect==NULL) {
+ BLI_lock_thread(LOCK_CUSTOM1);
+ if(ibuf->rect==NULL)
+ imb_addrectImBuf(ibuf);
+ BLI_unlock_thread(LOCK_CUSTOM1);
+ }
rectf+= 4*(rr->rectx*ymin + xmin);
rectc= (char *)(ibuf->rect + ibuf->x*rymin + rxmin);
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 2ba7de356d1..55bec0740ea 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -38,6 +38,7 @@
#include "DNA_screen_types.h"
#include "PIL_time.h"
+#include "BLI_threads.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
@@ -75,16 +76,19 @@ static void image_verify_buffer_float(SpaceImage *sima, Image *ima, ImBuf *ibuf,
NOTE: if float buffer changes, we have to manually remove the rect
*/
- if(ibuf->rect_float) {
- if(ibuf->rect==NULL) {
- if (color_manage) {
- if (ima && ima->source == IMA_SRC_VIEWER)
+ 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;
}
+ else
+ ibuf->profile = IB_PROFILE_NONE;
+
IMB_rect_from_float(ibuf);
}
+ BLI_unlock_thread(LOCK_CUSTOM1);
}
}