diff options
author | Benjamin Otte <otte@gnome.org> | 2009-09-28 23:51:14 +0200 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2009-09-29 00:11:48 +0200 |
commit | 9e89de813516c48baed67a4d18325971cd42cd4a (patch) | |
tree | a0ea41ddbdb74bffb0e49eb633074433f1c7114e /src | |
parent | 4b2c74e28531e403a9538f20a3ace7b114f9bbae (diff) |
[image] Fix masks computation for BGRx format
Patch originally by Mark Kettenis
Diffstat (limited to 'src')
-rw-r--r-- | src/cairo-image-surface.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c index 29ed1191..9310a517 100644 --- a/src/cairo-image-surface.c +++ b/src/cairo-image-surface.c @@ -276,9 +276,9 @@ _pixman_format_to_masks (pixman_format_code_t format, return TRUE; #ifdef PIXMAN_TYPE_BGRA case PIXMAN_TYPE_BGRA: - masks->blue_mask = MASK (b) << (g + r + a); - masks->green_mask = MASK (g) << (r + a); - masks->red_mask = MASK (r) << (a); + masks->blue_mask = MASK (b) << (masks->bpp - b); + masks->green_mask = MASK (g) << (masks->bpp - b - g); + masks->red_mask = MASK (r) << (masks->bpp - b - g - r); masks->alpha_mask = MASK (a); return TRUE; #endif |