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:
authorCampbell Barton <ideasman42@gmail.com>2021-09-06 13:04:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-09-06 13:05:58 +0300
commit687f70ceca88324fb8f376e086a55b341dd34e6f (patch)
tree1d9b467aecc63dbb78c77d67d046e3a86527cef1 /source/blender/imbuf/IMB_imbuf.h
parenta0912ff5663b950222ef00485a3853bfb6001db4 (diff)
ImBuf: add IMB_allocFromBufferOwn that takes ownership of the buffer
Avoids duplicating the image buffer when saving thumbnails.
Diffstat (limited to 'source/blender/imbuf/IMB_imbuf.h')
-rw-r--r--source/blender/imbuf/IMB_imbuf.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h
index 4ad7aa98484..dd8e6549e24 100644
--- a/source/blender/imbuf/IMB_imbuf.h
+++ b/source/blender/imbuf/IMB_imbuf.h
@@ -150,6 +150,14 @@ bool IMB_initImBuf(
/**
* Create a copy of a pixel buffer and wrap it to a new ImBuf
+ * (transferring ownership to the in imbuf).
+ * \attention Defined in allocimbuf.c
+ */
+struct ImBuf *IMB_allocFromBufferOwn(
+ unsigned int *rect, float *rectf, unsigned int w, unsigned int h, unsigned int channels);
+
+/**
+ * Create a copy of a pixel buffer and wrap it to a new ImBuf
* \attention Defined in allocimbuf.c
*/
struct ImBuf *IMB_allocFromBuffer(const unsigned int *rect,