From 2aef87bfae4a6a91f626780767aab68b7791c9d4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 16 Feb 2018 01:13:46 +1100 Subject: Cleanup: rename BLI_thread.h API - Use BLI_threadpool_ prefix for (deprecated) thread/listbase API. - Use BLI_thread as prefix for other functions. See P614 to apply instead of manually resolving conflicts. --- source/blender/imbuf/intern/colormanagement.c | 14 +++++++------- source/blender/imbuf/intern/thumbs.c | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'source/blender/imbuf') diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index 863bce125c5..e28c8122006 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -2176,7 +2176,7 @@ unsigned char *IMB_display_buffer_acquire(ImBuf *ibuf, const ColorManagedViewSet BLI_rcti_init(&ibuf->invalid_rect, 0, 0, 0, 0); } - BLI_lock_thread(LOCK_COLORMANAGE); + BLI_thread_lock(LOCK_COLORMANAGE); /* ensure color management bit fields exists */ if (!ibuf->display_buffer_flags) { @@ -2194,7 +2194,7 @@ unsigned char *IMB_display_buffer_acquire(ImBuf *ibuf, const ColorManagedViewSet display_buffer = colormanage_cache_get(ibuf, &cache_view_settings, &cache_display_settings, cache_handle); if (display_buffer) { - BLI_unlock_thread(LOCK_COLORMANAGE); + BLI_thread_unlock(LOCK_COLORMANAGE); return display_buffer; } @@ -2205,7 +2205,7 @@ unsigned char *IMB_display_buffer_acquire(ImBuf *ibuf, const ColorManagedViewSet colormanage_cache_put(ibuf, &cache_view_settings, &cache_display_settings, display_buffer, cache_handle); - BLI_unlock_thread(LOCK_COLORMANAGE); + BLI_thread_unlock(LOCK_COLORMANAGE); return display_buffer; } @@ -2244,11 +2244,11 @@ void IMB_display_buffer_transform_apply(unsigned char *display_buffer, float *li void IMB_display_buffer_release(void *cache_handle) { if (cache_handle) { - BLI_lock_thread(LOCK_COLORMANAGE); + BLI_thread_lock(LOCK_COLORMANAGE); colormanage_cache_handle_release(cache_handle); - BLI_unlock_thread(LOCK_COLORMANAGE); + BLI_thread_unlock(LOCK_COLORMANAGE); } } @@ -2964,7 +2964,7 @@ static void imb_partial_display_buffer_update_ex(ImBuf *ibuf, view_flag = 1 << (cache_view_settings.view - 1); display_index = cache_display_settings.display - 1; - BLI_lock_thread(LOCK_COLORMANAGE); + BLI_thread_lock(LOCK_COLORMANAGE); if ((ibuf->userflags & IB_DISPLAY_BUFFER_INVALID) == 0) { display_buffer = colormanage_cache_get(ibuf, @@ -2983,7 +2983,7 @@ static void imb_partial_display_buffer_update_ex(ImBuf *ibuf, memset(ibuf->display_buffer_flags, 0, global_tot_display * sizeof(unsigned int)); ibuf->display_buffer_flags[display_index] |= view_flag; - BLI_unlock_thread(LOCK_COLORMANAGE); + BLI_thread_unlock(LOCK_COLORMANAGE); } if (display_buffer == NULL) { diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index 3629332a4ac..3c587684641 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -652,7 +652,7 @@ static struct IMBThumbLocks { void IMB_thumb_locks_acquire(void) { - BLI_lock_thread(LOCK_IMAGE); + BLI_thread_lock(LOCK_IMAGE); if (thumb_locks.lock_counter == 0) { BLI_assert(thumb_locks.locked_paths == NULL); @@ -663,12 +663,12 @@ void IMB_thumb_locks_acquire(void) BLI_assert(thumb_locks.locked_paths != NULL); BLI_assert(thumb_locks.lock_counter > 0); - BLI_unlock_thread(LOCK_IMAGE); + BLI_thread_unlock(LOCK_IMAGE); } void IMB_thumb_locks_release(void) { - BLI_lock_thread(LOCK_IMAGE); + BLI_thread_lock(LOCK_IMAGE); BLI_assert((thumb_locks.locked_paths != NULL) && (thumb_locks.lock_counter > 0)); thumb_locks.lock_counter--; @@ -678,14 +678,14 @@ void IMB_thumb_locks_release(void) BLI_condition_end(&thumb_locks.cond); } - BLI_unlock_thread(LOCK_IMAGE); + BLI_thread_unlock(LOCK_IMAGE); } void IMB_thumb_path_lock(const char *path) { void *key = BLI_strdup(path); - BLI_lock_thread(LOCK_IMAGE); + BLI_thread_lock(LOCK_IMAGE); BLI_assert((thumb_locks.locked_paths != NULL) && (thumb_locks.lock_counter > 0)); if (thumb_locks.locked_paths) { @@ -694,14 +694,14 @@ void IMB_thumb_path_lock(const char *path) } } - BLI_unlock_thread(LOCK_IMAGE); + BLI_thread_unlock(LOCK_IMAGE); } void IMB_thumb_path_unlock(const char *path) { const void *key = path; - BLI_lock_thread(LOCK_IMAGE); + BLI_thread_lock(LOCK_IMAGE); BLI_assert((thumb_locks.locked_paths != NULL) && (thumb_locks.lock_counter > 0)); if (thumb_locks.locked_paths) { @@ -711,5 +711,5 @@ void IMB_thumb_path_unlock(const char *path) BLI_condition_notify_all(&thumb_locks.cond); } - BLI_unlock_thread(LOCK_IMAGE); + BLI_thread_unlock(LOCK_IMAGE); } -- cgit v1.2.3