Color management: Avoid memory copy into same buffer
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 12 Apr 2017 08:23:38 +0000 (10:23 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 12 Apr 2017 08:23:38 +0000 (10:23 +0200)
source/blender/imbuf/intern/colormanagement.c

index 48cba3e0800310b8383b4c52caa038a3309db00d..0881a24422d04e9d7f15144f6af70039efd315e9 100644 (file)
@@ -1406,7 +1406,7 @@ static void *do_display_buffer_apply_thread(void *handle_v)
        bool is_data = handle->is_data;
 
        if (cm_processor == NULL) {
-               if (display_buffer_byte) {
+               if (display_buffer_byte && display_buffer_byte != handle->byte_buffer) {
                        IMB_buffer_byte_from_byte(display_buffer_byte, handle->byte_buffer, IB_PROFILE_SRGB, IB_PROFILE_SRGB,
                                                  false, width, height, width, width);
                }