diff options
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/IMB_imbuf_types.h | 7 | ||||
-rw-r--r-- | source/blender/imbuf/intern/allocimbuf.c | 3 | ||||
-rw-r--r-- | source/blender/imbuf/intern/divers.c | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h index f60c6d03547..5629ead80db 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -137,12 +137,7 @@ typedef struct ImBuf { #define IB_BITMAPFONT (1 << 0) /* this image is a font */ #define IB_BITMAPDIRTY (1 << 1) /* image needs to be saved is not the same as filename */ #define IB_MIPMAP_INVALID (1 << 2) /* image mipmaps are invalid, need recreate */ - -/* From iff.h. This was once moved away by Frank, now Nzc moves it - * back. Such is the way it is... It is a long list of defines, and - * there are a few external defines in the back. Most of the stuff is - * probably imbuf_intern only. This will need to be merged later - * on. */ +#define IB_RECT_INVALID (1 << 3) /* float buffer changed, needs recreation of byte rect */ /** * \name Imbuf Component flags diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c index 17387c0a4d3..fa823169966 100644 --- a/source/blender/imbuf/intern/allocimbuf.c +++ b/source/blender/imbuf/intern/allocimbuf.c @@ -277,7 +277,8 @@ short imb_addrectfloatImBuf(ImBuf *ibuf) if(ibuf==NULL) return FALSE; - imb_freerectfloatImBuf(ibuf); + if(ibuf->rect_float) + imb_freerectfloatImBuf(ibuf); /* frees mipmap too, hrm */ size = ibuf->x *ibuf->y; size = size *4 *sizeof(float); diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index 9e2c32765d2..9605185e897 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -188,6 +188,8 @@ void IMB_rect_from_float(struct ImBuf *ibuf) } } } + /* ensure user flag is reset */ + ibuf->userflags &= ~IB_RECT_INVALID; } static void imb_float_from_rect_nonlinear(struct ImBuf *ibuf, float *fbuf) |