diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-05-06 12:48:07 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-05-06 12:49:09 +0300 |
commit | ef0c02cb4dbd5f74fd0cb7c7ef119e4ca1936249 (patch) | |
tree | 1000d42908297b93b1f767209438bc88ef3f5f18 /source/blender/imbuf/IMB_imbuf.h | |
parent | 204f55c189d7e7a7b7808b6730a285326e7ac38a (diff) |
Speedup of regular 2D painting
Yet another commit which makes painting aware of multi-threaded systems.
Diffstat (limited to 'source/blender/imbuf/IMB_imbuf.h')
-rw-r--r-- | source/blender/imbuf/IMB_imbuf.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index 383a5f19c4a..93d2b3e0cd0 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -130,7 +130,18 @@ void IMB_freeImBuf(struct ImBuf *ibuf); * \attention Defined in allocimbuf.c */ struct ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, - unsigned char d, unsigned int flags); + unsigned char planes, unsigned int flags); + +/** + * Initialize given ImBuf. + * + * Use in cases when temporary image buffer is allocated on stack. + * + * \attention Defined in allocimbuf.c + */ +bool IMB_initImBuf(struct ImBuf *ibuf, + unsigned int x, unsigned int y, + unsigned char planes, unsigned int flags); /** * Create a copy of a pixel buffer and wrap it to a new ImBuf @@ -213,6 +224,10 @@ void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *obuf, struct ImBuf *sbuf, unsigned short *dmask, unsigned short *curvemask, unsigned short *mmask, float mask_max, int destx, int desty, int origx, int origy, int srcx, int srcy, int width, int height, IMB_BlendMode mode, bool accumulate); +void IMB_rectblend_threaded(struct ImBuf *dbuf, struct ImBuf *obuf, struct ImBuf *sbuf, + unsigned short *dmask, unsigned short *curvemask, unsigned short *mmask, float mask_max, + int destx, int desty, int origx, int origy, int srcx, int srcy, + int width, int height, IMB_BlendMode mode, bool accumulate); /** * |