From e2b2d083e0cd2c738962e2a4535acdfb17f37416 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Sun, 17 Mar 2013 18:09:09 +0000 Subject: Fix "can't paint" bug no.1, painting with black on image editor did not paint. Was own regression when optimizing colour operations. I will not use an alpha bit mask since it may run into portability issues with byte order. --- source/blender/imbuf/IMB_imbuf_types.h | 1 - source/blender/imbuf/intern/rectop.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/imbuf') diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h index a3629d079a3..dde8d4d4ab7 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -179,7 +179,6 @@ typedef struct ImBuf { * Note that the lower 11 bits is used for storing custom flags */ #define IB_CUSTOM_FLAGS_MASK 0x7ff -#define IB_ALPHA_MASK 0xff #define PNG (1 << 30) #define TGA (1 << 28) diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c index 8b60d1a96df..446833ccf3b 100644 --- a/source/blender/imbuf/intern/rectop.c +++ b/source/blender/imbuf/intern/rectop.c @@ -517,7 +517,7 @@ void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx, dr = drect; sr = srect; for (x = width; x > 0; x--, dr++, sr++) { - if (*sr & IB_ALPHA_MASK) + if (((char *)sr)[3]) func((char *)dr, (char *)dr, (char *)sr, ((char *)sr)[3]); } -- cgit v1.2.3