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:
Diffstat (limited to 'source/blender/imbuf/intern/allocimbuf.c')
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index 59772771f3b..6ce6c9409d1 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -177,6 +177,19 @@ void IMB_refImBuf(ImBuf *ibuf)
ibuf->refcounter++;
}
+ImBuf * IMB_makeSingleUser(ImBuf *ibuf)
+{
+ ImBuf * rval;
+
+ if (!ibuf || ibuf->refcounter == 0) { return ibuf; }
+
+ rval = IMB_dupImBuf(ibuf);
+
+ IMB_freeImBuf(ibuf);
+
+ return rval;
+}
+
short addzbufImBuf(ImBuf *ibuf)
{
int size;