seems I was wrong here : no overflow happens since the comparison is done on the fly
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18041 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -17,9 +17,9 @@
|
|||||||
{ \
|
{ \
|
||||||
pixel32 _p; \
|
pixel32 _p; \
|
||||||
_p.data32 = *(uint32*)d; \
|
_p.data32 = *(uint32*)d; \
|
||||||
uint8 rt = min_c(255, _p.data8[2] + (uint16)(r)); \
|
uint8 rt = min_c(255, _p.data8[2] + (r)); \
|
||||||
uint8 gt = min_c(255, _p.data8[1] + (uint16)(g)); \
|
uint8 gt = min_c(255, _p.data8[1] + (g)); \
|
||||||
uint8 bt = min_c(255, _p.data8[0] + (uint16)(b)); \
|
uint8 bt = min_c(255, _p.data8[0] + (b)); \
|
||||||
BLEND(d, rt, gt, bt, a); \
|
BLEND(d, rt, gt, bt, a); \
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,9 +28,9 @@
|
|||||||
{ \
|
{ \
|
||||||
pixel32 _p; \
|
pixel32 _p; \
|
||||||
_p.data32 = *(uint32*)d; \
|
_p.data32 = *(uint32*)d; \
|
||||||
d[0] = min_c(255, _p.data8[0] + (uint16)(b)); \
|
d[0] = min_c(255, _p.data8[0] + (b)); \
|
||||||
d[1] = min_c(255, _p.data8[1] + (uint16)(g)); \
|
d[1] = min_c(255, _p.data8[1] + (g)); \
|
||||||
d[2] = min_c(255, _p.data8[2] + (uint16)(r)); \
|
d[2] = min_c(255, _p.data8[2] + (r)); \
|
||||||
d[3] = 255; \
|
d[3] = 255; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user