Mercurial > sdl-ios-xcode
comparison src/video/SDL_RLEaccel.c @ 2817:b039bfa19ccd
Save opaque alpha in the destination, fixes white spotlight in testalpha on Mac OS X.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 01 Dec 2008 00:41:19 +0000 |
parents | 5f3831f1c3ea |
children | 4dba7aa7ea77 |
comparison
equal
deleted
inserted
replaced
2816:22e393158355 | 2817:b039bfa19ccd |
---|---|
969 Uint32 d1 = d & 0xff00ff; \ | 969 Uint32 d1 = d & 0xff00ff; \ |
970 d1 = (d1 + ((s1 - d1) * alpha >> 8)) & 0xff00ff; \ | 970 d1 = (d1 + ((s1 - d1) * alpha >> 8)) & 0xff00ff; \ |
971 s &= 0xff00; \ | 971 s &= 0xff00; \ |
972 d &= 0xff00; \ | 972 d &= 0xff00; \ |
973 d = (d + ((s - d) * alpha >> 8)) & 0xff00; \ | 973 d = (d + ((s - d) * alpha >> 8)) & 0xff00; \ |
974 dst = d1 | d; \ | 974 dst = d1 | d | 0xff000000; \ |
975 } while(0) | 975 } while(0) |
976 | 976 |
977 /* | 977 /* |
978 * For 16bpp pixels, we have stored the 5 most significant alpha bits in | 978 * For 16bpp pixels, we have stored the 5 most significant alpha bits in |
979 * bits 5-10. As before, we can process all 3 RGB components at the same time. | 979 * bits 5-10. As before, we can process all 3 RGB components at the same time. |