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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-09-29 20:54:25 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-09-29 20:54:25 +0300
commit7d2a62ef65e075d10ac57aaf170f5c08e2e5b267 (patch)
treeeac5cccaf1b281254313742035b1f049278cadc4 /source/blender/imbuf/intern/IMB_allocimbuf.h
parent2eb0c990f13c82f3f2ad368712669b9ff298b953 (diff)
Fix T46299: Windows: File Browser Crash while listing big folders in preview mode (fonts, images...).
Windows-only bug, mmap & co are not threadsafe by default on this platform, so we have to add a dedicated spinlock for them in win32. Note that we may try to get rid of those mmap later, but not for 2.76! To be backported to final 2.76...
Diffstat (limited to 'source/blender/imbuf/intern/IMB_allocimbuf.h')
-rw-r--r--source/blender/imbuf/intern/IMB_allocimbuf.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/IMB_allocimbuf.h b/source/blender/imbuf/intern/IMB_allocimbuf.h
index f4d6d869f1b..a754a4919eb 100644
--- a/source/blender/imbuf/intern/IMB_allocimbuf.h
+++ b/source/blender/imbuf/intern/IMB_allocimbuf.h
@@ -38,6 +38,18 @@ struct ImBuf;
void imb_refcounter_lock_init(void);
void imb_refcounter_lock_exit(void);
+#ifdef WIN32
+void imb_mmap_lock_init(void);
+void imb_mmap_lock_exit(void);
+void imb_mmap_lock(void);
+void imb_mmap_unlock(void);
+#else
+# define imb_mmap_lock_init()
+# define imb_mmap_lock_exit()
+# define imb_mmap_lock()
+# define imb_mmap_unlock()
+#endif
+
bool imb_addencodedbufferImBuf(struct ImBuf *ibuf);
bool imb_enlargeencodedbufferImBuf(struct ImBuf *ibuf);