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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-03-25 10:30:41 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-03-25 10:30:41 +0400
commit6452d9f02f07fb3aaa7c6601228ef96015a54996 (patch)
tree169140e9963fecf24f9d4e8b2ab2e9ebb5e8d026 /source/blender/imbuf/intern/moviecache.c
parentbd57ec686c7ec00a9a01e30f32bbcfd3c21a41fb (diff)
Fix T39395: Switching to "Textured solid" and "GLSL" view will cause the FPS drop to 0
Issue was caused by the cache limitor which was removing 4k textures from the memory when accessing other images. This is pretty much awful situation and solved by making it so only image sequences and movies ace cache-guarded. Could be optimized further so images used by viewport are not being freed, but that's much more tricky to do.. This is a nice candidature for 'a'.
Diffstat (limited to 'source/blender/imbuf/intern/moviecache.c')
-rw-r--r--source/blender/imbuf/intern/moviecache.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/moviecache.c b/source/blender/imbuf/intern/moviecache.c
index 07ce3c39d73..f699afd3475 100644
--- a/source/blender/imbuf/intern/moviecache.c
+++ b/source/blender/imbuf/intern/moviecache.c
@@ -200,6 +200,18 @@ static size_t IMB_get_size_in_memory(ImBuf *ibuf)
int a;
size_t size = 0, channel_size = 0;
+ /* Persistent images should have no affect on how "normal"
+ * images are cached.
+ *
+ * This is a bit arbitrary, but would make it so only movies
+ * and sequences are memory limited, keeping textures in the
+ * memory in order to avoid constant file reload on viewport
+ * update.
+ */
+ if (ibuf->userflags & IB_PERSISTENT) {
+ return 0;
+ }
+
size += sizeof(ImBuf);
if (ibuf->rect)