Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-03-15 13:35:12 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-03-15 13:35:12 +0400
commit42660a204a553b331a7d99d4f49987c46707fa2c (patch)
tree5b2305f5f03e09fd35ef1a330409557076cac5b7 /source/blender/imbuf/intern/colormanagement.c
parent9d5c3264da1a2f0639777366682c4c13d9d83122 (diff)
Skip allocating any display buffer and starting any threads
in case image buffer contains byte buffer only and it's color space matches display space. It was already check for this case, but it happened later in color management routines, which is needed for saving files, but not fast enough for realtime playback of 4K.
Diffstat (limited to 'source/blender/imbuf/intern/colormanagement.c')
-rw-r--r--source/blender/imbuf/intern/colormanagement.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index 10dc517f56a..505ba2599df 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -1853,6 +1853,14 @@ unsigned char *IMB_display_buffer_acquire(ImBuf *ibuf, const ColorManagedViewSet
applied_view_settings = &default_view_settings;
}
+ /* early out: no float buffer and byte buffer is already in display space,
+ * let's just use if
+ */
+ if (ibuf->rect_float == NULL && ibuf->rect_colorspace) {
+ if (is_ibuf_rect_in_display_space(ibuf, applied_view_settings, display_settings))
+ return (unsigned char *) ibuf->rect;
+ }
+
colormanage_view_settings_to_cache(&cache_view_settings, applied_view_settings);
colormanage_display_settings_to_cache(&cache_display_settings, display_settings);