Color management: do not initialize threads in case conversion
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 5 Jul 2012 09:40:53 +0000 (09:40 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 5 Jul 2012 09:40:53 +0000 (09:40 +0000)
happens in single thread only.

source/blender/imbuf/intern/colormanagement.c

index b9d57d2317ac3cbd069c57f6730382a9766a9efb..cc9bff5affe8e81f7bd187048364956951fabaed 100644 (file)
@@ -622,7 +622,8 @@ static void display_buffer_apply_threaded(ImBuf *ibuf, float *buffer, unsigned c
        int i, tot_thread = BLI_system_thread_count();
        int start_line, tot_line;
 
-       BLI_init_threads(&threads, do_thread, tot_thread);
+       if (tot_thread > 1)
+               BLI_init_threads(&threads, do_thread, tot_thread);
 
        start_line = 0;
        tot_line = ((float)(ibuf->y / tot_thread)) + 0.5f;