[Xorg-driver-geode] [PATCH 5/7] Fix the PictOpSrc rendering
Huang, FrankR
FrankR.Huang at amd.com
Thu Jun 10 00:04:05 PDT 2010
From: Frank Huang <frankr.huang at amd.com>
*Use the PictOpClear to make other non-blending region to be black
if the op is PictOpSrc.
*Use exaScratch.repeat and exaScratch.maskrepeat together instead of
exaScratch.repeat when the mask is not zero
Signed-off-by: Frank Huang <frankr.huang at amd.com>
---
src/lx_exa.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/lx_exa.c b/src/lx_exa.c
index 9fb92c4..cf80a42 100644
--- a/src/lx_exa.c
+++ b/src/lx_exa.c
@@ -1076,9 +1076,6 @@ lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX,
break;
}
- if (!exaScratch.repeat)
- break;
-
opX += opWidth;
if (opX >= dstX + width) {
@@ -1094,11 +1091,22 @@ lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX,
? (exaScratch.srcWidth - maskX) : (dstX + width) - opX;
opHeight = ((dstY + height) - opY) > (exaScratch.srcHeight - maskY)
? (exaScratch.srcHeight - maskY) : (dstY + height) - opY;
+ /* For the PictOpSrc operation, we need other region to be black
+ * out of the blend region */
+ if (exaScratch.repeat && (!exaScratch.maskrepeat) &&
+ (exaScratch.op == PictOpSrc)) {
+ exaScratch.type = COMP_TYPE_ONEPASS;
+ exaScratch.op = PictOpClear;
+ }
} else {
opWidth = ((dstX + width) - opX) > exaScratch.srcWidth ?
exaScratch.srcWidth : (dstX + width) - opX;
opHeight = ((dstY + height) - opY) > exaScratch.srcHeight ?
exaScratch.srcHeight : (dstY + height) - opY;
+ if ((!exaScratch.repeat) && (exaScratch.op == PictOpSrc)) {
+ exaScratch.type = COMP_TYPE_ONEPASS;
+ exaScratch.op = PictOpClear;
+ }
}
}
--
1.7.1
More information about the Xorg-driver-geode
mailing list