diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-05-04 02:07:03 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-05-04 02:07:03 +0300 |
commit | e6bf272abd92e0b524ac35e81599075f21537c97 (patch) | |
tree | 8851aa37bf8b7f9d35552f59183d4598798161e0 /source/blender | |
parent | 042df5fd6ad75868a93fbeff100c9d4eb7382e4d (diff) | |
parent | b874c152a81c6c52a17a7157ce7be57f2ee28cf4 (diff) |
Merge branch 'blender-v2.93-release'
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 13 | ||||
-rw-r--r-- | source/blender/editors/render/render_internal.c | 7 |
2 files changed, 14 insertions, 6 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 287334a34ee..cb2634e6fda 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -299,12 +299,16 @@ bool BLI_file_alias_target(const char *filepath, return false; } - IShellLinkW *Shortcut = NULL; - bool success = false; - CoInitializeEx(NULL, COINIT_MULTITHREADED); + HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); + if (FAILED(hr)) { + return false; + } - HRESULT hr = CoCreateInstance( + IShellLinkW *Shortcut = NULL; + hr = CoCreateInstance( &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkW, (LPVOID *)&Shortcut); + + bool success = false; if (SUCCEEDED(hr)) { IPersistFile *PersistFile; hr = Shortcut->lpVtbl->QueryInterface(Shortcut, &IID_IPersistFile, (LPVOID *)&PersistFile); @@ -328,6 +332,7 @@ bool BLI_file_alias_target(const char *filepath, Shortcut->lpVtbl->Release(Shortcut); } + CoUninitialize(); return (success && r_targetpath[0]); # else UNUSED_VARS(r_targetpath, filepath); diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 0b5a8db0115..0bec509cd7e 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -574,9 +574,12 @@ static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrec return; } if (rj->image_outdated) { - /* update entire render */ + /* Free all render buffer caches when switching slots, with lock to ensure main + * thread is not drawing the buffer at the same time. */ rj->image_outdated = false; - BKE_image_signal(rj->main, ima, NULL, IMA_SIGNAL_COLORMANAGE); + ibuf = BKE_image_acquire_ibuf(ima, &rj->iuser, &lock); + BKE_image_free_buffers(ima); + BKE_image_release_ibuf(ima, ibuf, lock); *(rj->do_update) = true; return; } |