summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/xorg/xorg_composite.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2009-11-16 22:57:43 +0100
committerJakob Bornecrantz <jakob@vmware.com>2009-11-16 23:33:45 +0100
commitcb060f3b987c9fa07ebe06cf2e7e54d1eaded1e1 (patch)
tree857e08954e1c4c1aa462d0634f08a4c0d1eaf8aa /src/gallium/state_trackers/xorg/xorg_composite.c
parent5438ee3ecfe5c25102d196fd6d7258201e27e6ca (diff)
st/xorg: Fix comp alpha code and deal with luminance masks
There are two fixes in here one is a one liner that fixes component alpha logic. The other deals better with luminance formats used for masks, sources not yet implemented. Fixes component alpha text and icons in gnome. There are a one or two cases that this code misses. Like if src_luminance is set but no mask image is given.
Diffstat (limited to 'src/gallium/state_trackers/xorg/xorg_composite.c')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_composite.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c b/src/gallium/state_trackers/xorg/xorg_composite.c
index 1ff19a2a5c..93a3e1b8cf 100644
--- a/src/gallium/state_trackers/xorg/xorg_composite.c
+++ b/src/gallium/state_trackers/xorg/xorg_composite.c
@@ -235,8 +235,11 @@ picture_format_fixups(struct exa_pixmap_priv *pSrc, PicturePtr pSrcPicture, bool
boolean swizzle = FALSE;
unsigned ret = 0;
- if (pSrc->picture_format == pSrcPicture->format)
+ if (pSrc->picture_format == pSrcPicture->format) {
+ if (pSrc->picture_format == PICT_a8)
+ return mask ? FS_MASK_LUMINANCE : FS_MASK_LUMINANCE;
return 0;
+ }
if (pSrc->picture_format != PICT_a8r8g8b8) {
assert(!"can not handle formats");