зеркало из https://github.com/mozilla/gecko-dev.git
b=359002, single-pixel images are being drawn with wrong color; bugfix to previous patch, r=stuart
This commit is contained in:
Родитель
93477ecccb
Коммит
1855b70f4a
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче