Merging r48889 through r48893 from trunk into soc-2011-tomato
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 13 Jul 2012 14:21:17 +0000 (14:21 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 13 Jul 2012 14:21:17 +0000 (14:21 +0000)
1  2 
source/blender/compositor/operations/COM_MaskOperation.cpp
source/blender/compositor/operations/COM_ViewerBaseOperation.cpp
source/blender/editors/space_image/image_draw.c
source/blender/editors/space_node/node_draw.c

index f229c6cf3654c24c28798e9a4d9c40b3eaac5b34,2470b239987546209f1aa29c47f63b2c6e5f357b..5b2b63709536fe891b991272d4190bf5d2b07f1a
@@@ -63,9 -59,11 +63,11 @@@ void ViewerBaseOperation::initImage(
  {
        Image *anImage = this->m_image;
        ImBuf *ibuf = BKE_image_acquire_ibuf(anImage, this->m_imageUser, &this->m_lock);
 -      
 +
        if (!ibuf) return;
        if (ibuf->x != (int)getWidth() || ibuf->y != (int)getHeight()) {
+               BLI_lock_thread(LOCK_DRAW_IMAGE);
                imb_freerectImBuf(ibuf);
                imb_freerectfloatImBuf(ibuf);
                IMB_freezbuffloatImBuf(ibuf);
                imb_addrectImBuf(ibuf);
                imb_addrectfloatImBuf(ibuf);
                anImage->ok = IMA_OK_LOADED;
+               BLI_unlock_thread(LOCK_DRAW_IMAGE);
        }
 -      
 +
 +      this->m_partialBufferUpdate = IMB_partial_buffer_update_context_new(ibuf);
 +
        /* now we combine the input with ibuf */
        this->m_outputBuffer = ibuf->rect_float;
        this->m_outputBufferDisplay = (unsigned char *)ibuf->rect;