summaryrefslogtreecommitdiff
path: root/uxa
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-26 10:14:52 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-05-26 10:21:03 +0100
commitb9ada52a3081f54e0ed094ac31188bb240866f81 (patch)
tree2bbb6ed5a7f9521de0464b40d7987414cf8c815b /uxa
parent3055d40164590147d35b5e7059ebe5f5858c85fa (diff)
uxa: Force the alpha value to 0xffff when treating Over as Src
Since we have at most 8 bits of alpha, we treat >= 0xff00 as opaque. However, being paranoid we should set the alpha value to 0xfff in case something unexpected happens when converting from the xRenderColor to the pixel value. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'uxa')
-rw-r--r--uxa/uxa-render.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 41daf064..f1c34e7b 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -969,8 +969,10 @@ uxa_solid_rects (CARD8 op,
if (op == PictOpClear)
color->red = color->green = color->blue = color->alpha = 0;
- if (color->alpha >= 0xff00 && op == PictOpOver)
+ if (color->alpha >= 0xff00 && op == PictOpOver) {
+ color->alpha = 0xffff;
op = PictOpSrc;
+ }
/* Using GEM, the relocation costs outweigh the advantages of the blitter */
if (num_boxes == 1 && (op == PictOpSrc || op == PictOpClear)) {