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>2012-07-05 13:41:12 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-07-05 13:41:12 +0400
commit2e12919c4b3017e223980d0c209f60d836202214 (patch)
treef9f4c9e74c52a796a93c705059e6dbf5d7ff8d2d /source/blender/editors
parent8b1f1be3aeb6dc5fd98eb10d98ddd3ceeb1b71e0 (diff)
Color management: skip generating byte buffers in verify_buffer_float
This saves some time in cases color management is used by sipping generating non-color managed buffers.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_clip/clip_draw.c9
-rw-r--r--source/blender/editors/space_image/image_draw.c11
2 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index 61834b19da4..f1c8516cb8c 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -245,12 +245,18 @@ static void draw_movieclip_notes(SpaceClip *sc, ARegion *ar)
ED_region_info_draw(ar, str, block, 0.6f);
}
+/* OCIO_TODO: after finishing proper color management pipeline integration
+ * this wouldn't be needed -- color managed display buffer
+ * would be used unstead
+ */
+#if 0
static void verify_buffer_float(ImBuf *ibuf)
{
if (ibuf->rect_float && (ibuf->rect == NULL || (ibuf->userflags & IB_RECT_INVALID))) {
IMB_rect_from_float(ibuf);
}
}
+#endif
static void draw_movieclip_buffer(wmWindow *win, SpaceClip *sc, ARegion *ar, ImBuf *ibuf,
int width, int height, float zoomx, float zoomy)
@@ -270,7 +276,8 @@ static void draw_movieclip_buffer(wmWindow *win, SpaceClip *sc, ARegion *ar, ImB
unsigned char *display_buffer;
void *cache_handle;
- verify_buffer_float(ibuf);
+ /* OCIO_TODO: finally get rid of this stuff */
+ /* verify_buffer_float(ibuf); */
view_settings = IMB_view_settings_get_effective(win, &sc->view_settings);
display_buffer = IMB_display_buffer_acquire(ibuf, view_settings, &win->display_settings, &cache_handle);
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index a4211508ae4..23b70903c43 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -79,6 +79,10 @@
#define HEADER_HEIGHT 18
+/* OCIO_TODO: after finishing proper color management pipeline integration
+ * this wouldn't be needed -- color managed display buffer
+ * would be used unstead
+ */
static void image_verify_buffer_float(Image *ima, ImBuf *ibuf, int color_manage)
{
/* detect if we need to redo the curve map.
@@ -96,7 +100,12 @@ static void image_verify_buffer_float(Image *ima, ImBuf *ibuf, int color_manage)
else
ibuf->profile = IB_PROFILE_NONE;
- IMB_rect_from_float(ibuf);
+ /* OCIO_TODO: currently only get rid of old-style color managed byte
+ * buffer calculation to save some time on buffer display,
+ * but still need to set image buffer's profile to prevent
+ * comatibility breackage
+ */
+ /* IMB_rect_from_float(ibuf); */
}
}