diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-01-13 16:42:40 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-01-13 16:47:15 +0400 |
commit | b1bb7d2ee06d13e95154d13a6e830b8b0f845cde (patch) | |
tree | 962aa741cbdb06dd9786d62e4641b9708efd6cc8 /source/blender/imbuf | |
parent | daedf5be8c077689af1987fd6932568d9ad64a9f (diff) |
Fix T38040: Crash after loading big image file in compositor
Issue was caused by cache limitor removing viewer image buffer
from the memory during compositing. Now made it so all viewer
images are persistent in the memory.
This solves the crash mentioned above and also makes it so
render/compo results are never lost.
Further tweaks are possible, but pretty much happy now, at
least no stoppers for work are there.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/IMB_imbuf_types.h | 1 | ||||
-rw-r--r-- | source/blender/imbuf/intern/moviecache.c | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h index d20130805c0..44cb7f1211e 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -150,6 +150,7 @@ typedef struct ImBuf { #define IB_MIPMAP_INVALID (1 << 2) /* image mipmaps are invalid, need recreate */ #define IB_RECT_INVALID (1 << 3) /* float buffer changed, needs recreation of byte rect */ #define IB_DISPLAY_BUFFER_INVALID (1 << 4) /* either float or byte buffer changed, need to re-calculate display buffers */ +#define IB_PERSISTENT (1 << 5) /* image buffer is persistent in the memory and should never be removed from the cache */ /** * \name Imbuf Component flags diff --git a/source/blender/imbuf/intern/moviecache.c b/source/blender/imbuf/intern/moviecache.c index 3718cb270c9..00d9dd2fe04 100644 --- a/source/blender/imbuf/intern/moviecache.c +++ b/source/blender/imbuf/intern/moviecache.c @@ -262,7 +262,9 @@ static bool get_item_destroyable(void *item_v) * * Such buffers are never to be freed. */ - if (item->ibuf->userflags & IB_BITMAPDIRTY) { + if ((item->ibuf->userflags & IB_BITMAPDIRTY) || + (item->ibuf->userflags & IB_PERSISTENT)) + { return false; } return true; |