1
0
Fork 0

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 39da95c421
commit edca282ad0
2 changed files with 16 additions and 6 deletions

View file

@ -1,3 +1,13 @@
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.
2008-06-30 Chris Lord <chris@openedhand.com>
* tests/test-shader.c: (main):

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