mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
2008-06-30 Emmanuele Bassi <ebassi@openedhand.com>
Bug 980 - cogl-bitmap-fallback.c compiler error/warning due to cast issue (Haakon Sporsheim) * clutter/cogl/common/cogl-bitmap-fallback.c: (_cogl_unpremult_alpha_last), (_cogl_unpremult_alpha_first): Cast to avoid a compiler warning with MSC.
This commit is contained in:
parent
2666778c26
commit
1ec582becb
@ -165,9 +165,9 @@ _cogl_unpremult_alpha_last (const guchar *src, guchar *dst)
|
|||||||
{
|
{
|
||||||
guchar alpha = src[3];
|
guchar alpha = src[3];
|
||||||
|
|
||||||
dst[0] = (((src[0] >> 16) & 0xff) * 255 ) / alpha;
|
dst[0] = ((((gulong) src[0] >> 16) & 0xff) * 255 ) / alpha;
|
||||||
dst[1] = (((src[1] >> 8) & 0xff) * 255 ) / alpha;
|
dst[1] = ((((gulong) src[1] >> 8) & 0xff) * 255 ) / alpha;
|
||||||
dst[2] = (((src[2] >> 0) & 0xff) * 255 ) / alpha;
|
dst[2] = ((((gulong) src[2] >> 0) & 0xff) * 255 ) / alpha;
|
||||||
dst[3] = alpha;
|
dst[3] = alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,9 +177,9 @@ _cogl_unpremult_alpha_first (const guchar *src, guchar *dst)
|
|||||||
guchar alpha = src[0];
|
guchar alpha = src[0];
|
||||||
|
|
||||||
dst[0] = alpha;
|
dst[0] = alpha;
|
||||||
dst[1] = (((src[1] >> 16) & 0xff) * 255 ) / alpha;
|
dst[1] = ((((gulong) src[1] >> 16) & 0xff) * 255 ) / alpha;
|
||||||
dst[2] = (((src[2] >> 8) & 0xff) * 255 ) / alpha;
|
dst[2] = ((((gulong) src[2] >> 8) & 0xff) * 255 ) / alpha;
|
||||||
dst[3] = (((src[3] >> 0) & 0xff) * 255 ) / alpha;
|
dst[3] = ((((gulong) src[3] >> 0) & 0xff) * 255 ) / alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
Loading…
Reference in New Issue
Block a user