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:
Emmanuele Bassi 2008-06-30 14:20:46 +00:00
parent 2666778c26
commit 1ec582becb

View File

@ -165,9 +165,9 @@ _cogl_unpremult_alpha_last (const guchar *src, guchar *dst)
{
guchar alpha = src[3];
dst[0] = (((src[0] >> 16) & 0xff) * 255 ) / alpha;
dst[1] = (((src[1] >> 8) & 0xff) * 255 ) / alpha;
dst[2] = (((src[2] >> 0) & 0xff) * 255 ) / alpha;
dst[0] = ((((gulong) src[0] >> 16) & 0xff) * 255 ) / alpha;
dst[1] = ((((gulong) src[1] >> 8) & 0xff) * 255 ) / alpha;
dst[2] = ((((gulong) src[2] >> 0) & 0xff) * 255 ) / alpha;
dst[3] = alpha;
}
@ -177,9 +177,9 @@ _cogl_unpremult_alpha_first (const guchar *src, guchar *dst)
guchar alpha = src[0];
dst[0] = alpha;
dst[1] = (((src[1] >> 16) & 0xff) * 255 ) / alpha;
dst[2] = (((src[2] >> 8) & 0xff) * 255 ) / alpha;
dst[3] = (((src[3] >> 0) & 0xff) * 255 ) / alpha;
dst[1] = ((((gulong) src[1] >> 16) & 0xff) * 255 ) / alpha;
dst[2] = ((((gulong) src[2] >> 8) & 0xff) * 255 ) / alpha;
dst[3] = ((((gulong) src[3] >> 0) & 0xff) * 255 ) / alpha;
}
gboolean