diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-09-18 12:49:08 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-09-18 12:49:08 +0300 |
commit | 5aa5066c3ba8f11ad5d435e4f571b3aabd31cb4e (patch) | |
tree | f4ffa9aea6baf05cbbbaf11ae67a13848bdc62b1 /source | |
parent | eadf0f3d705c7f3cd2ba9e14f5568c421d88cb2a (diff) | |
parent | d04eb330e873488d8b7cbe49da5600d6f64ea6db (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/imbuf/intern/filetype.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_api.cpp | 8 | ||||
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_api.h | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/filetype.c b/source/blender/imbuf/intern/filetype.c index 25bbd132a49..a5af51e3e95 100644 --- a/source/blender/imbuf/intern/filetype.c +++ b/source/blender/imbuf/intern/filetype.c @@ -74,7 +74,7 @@ const ImFileType IMB_FILE_TYPES[] = { {NULL, NULL, imb_is_a_hdr, NULL, imb_ftype_default, imb_loadhdr, NULL, imb_savehdr, NULL, IM_FTYPE_FLOAT, IMB_FTYPE_RADHDR, COLOR_ROLE_DEFAULT_FLOAT}, #endif #ifdef WITH_OPENEXR - {imb_initopenexr, NULL, imb_is_a_openexr, NULL, imb_ftype_default, imb_load_openexr, NULL, imb_save_openexr, NULL, IM_FTYPE_FLOAT, IMB_FTYPE_OPENEXR, COLOR_ROLE_DEFAULT_FLOAT}, + {imb_initopenexr, imb_exitopenexr, imb_is_a_openexr, NULL, imb_ftype_default, imb_load_openexr, NULL, imb_save_openexr, NULL, IM_FTYPE_FLOAT, IMB_FTYPE_OPENEXR, COLOR_ROLE_DEFAULT_FLOAT}, #endif #ifdef WITH_OPENJPEG {NULL, NULL, imb_is_a_jp2, NULL, imb_ftype_default, imb_load_jp2, NULL, imb_save_jp2, NULL, IM_FTYPE_FLOAT, IMB_FTYPE_JP2, COLOR_ROLE_DEFAULT_BYTE}, diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index e8e6e0576ed..bad5e0efd65 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -1921,4 +1921,12 @@ void imb_initopenexr(void) setGlobalThreadCount(num_threads); } +void imb_exitopenexr(void) +{ + /* Tells OpenEXR to free thread pool, also ensures there is no running + * tasks. + */ + setGlobalThreadCount(0); +} + } // export "C" diff --git a/source/blender/imbuf/intern/openexr/openexr_api.h b/source/blender/imbuf/intern/openexr/openexr_api.h index 92bbeecfd5d..32d276b31ea 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.h +++ b/source/blender/imbuf/intern/openexr/openexr_api.h @@ -40,6 +40,7 @@ extern "C" { #include <stdio.h> void imb_initopenexr (void); +void imb_exitopenexr (void); int imb_is_a_openexr (const unsigned char *mem); |