b=359002, single-pixel images are being drawn with wrong color; bugfix to previous patch, r=stuart

This commit is contained in:
vladimir%pobox.com 2006-11-08 01:34:10 +00:00
Родитель 28aba6bf10
Коммит f0ab221e6d
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -80,14 +80,16 @@ struct THEBES_API gfxRGBA {
*/
gfxRGBA(PRUint32 c, PackedColorType colorType = PACKED_ABGR) {
if (colorType == PACKED_ABGR ||
colorType == PACKED_XBGR)
colorType == PACKED_XBGR ||
colorType == PACKED_ABGR_PREMULTIPLIED)
{
r = ((c >> 0) & 0xff) / 255.0;
g = ((c >> 8) & 0xff) / 255.0;
b = ((c >> 16) & 0xff) / 255.0;
a = ((c >> 24) & 0xff) / 255.0;
} else if (colorType == PACKED_ARGB ||
colorType == PACKED_XRGB)
colorType == PACKED_XRGB ||
colorType == PACKED_ARGB_PREMULTIPLIED)
{
b = ((c >> 0) & 0xff) / 255.0;
g = ((c >> 8) & 0xff) / 255.0;