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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-09-23 22:50:56 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-09-23 22:50:56 +0400
commita42ba82f638e481d7fd3c3ed2ba05c331ef6717e (patch)
tree81a2b9221799707b49b74a5df8bb3ff964ba78bd /source/blender/imbuf/intern/allocimbuf.c
parent7afbdff1b6c348227e652e1c3071ab7ba7c91c44 (diff)
parenta73dd3476e7d180d3320afc04d218ce22f2f3bfc (diff)
Merged changes in the trunk up to revision 50829.
Conflicts resolved: source/blender/blenloader/intern/readfile.c source/blender/render/intern/source/convertblender.c source/blender/render/intern/source/pipeline.c Also addressed code inconsistency due to changes in the trunk revision 50628 (color management with OCIO) and 50806 (UV project material). OCIO-related changes are marked OCIO_TODO as in some other files modified in revision 50628.
Diffstat (limited to 'source/blender/imbuf/intern/allocimbuf.c')
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index 7724f444b2c..69048274104 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -41,6 +41,7 @@
#include "IMB_allocimbuf.h"
#include "IMB_filetype.h"
#include "IMB_metadata.h"
+#include "IMB_colormanagement_intern.h"
#include "imbuf.h"
@@ -162,8 +163,11 @@ void IMB_freeImBuf(ImBuf *ibuf)
IMB_freezbuffloatImBuf(ibuf);
freeencodedbufferImBuf(ibuf);
IMB_metadata_free(ibuf);
- if (ibuf->dds_data.data != NULL)
+ colormanage_cache_free(ibuf);
+
+ if (ibuf->dds_data.data != NULL) {
free(ibuf->dds_data.data); /* dds_data.data is allocated by DirectDrawSurface::readData(), so don't use MEM_freeN! */
+ }
MEM_freeN(ibuf);
}
}
@@ -354,7 +358,7 @@ ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, uchar planes, unsigned int
ibuf->ftype = TGA;
ibuf->channels = 4; /* float option, is set to other values when buffers get assigned */
ibuf->ppm[0] = ibuf->ppm[1] = IMB_DPI_DEFAULT / 0.0254; /* IMB_DPI_DEFAULT -> pixels-per-meter */
-
+
if (flags & IB_rect) {
if (imb_addrectImBuf(ibuf) == FALSE) {
IMB_freeImBuf(ibuf);
@@ -382,6 +386,9 @@ ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, uchar planes, unsigned int
return NULL;
}
}
+
+ /* assign default spaces */
+ colormanage_imbuf_set_default_spaces(ibuf);
}
return (ibuf);
}
@@ -442,8 +449,11 @@ ImBuf *IMB_dupImBuf(ImBuf *ibuf1)
/* for now don't duplicate metadata */
tbuf.metadata = NULL;
+ tbuf.display_buffer_flags = NULL;
+ tbuf.colormanage_cache = NULL;
+
*ibuf2 = tbuf;
-
+
return(ibuf2);
}