[Xorg-driver-geode] [PATCH 5/5] Fix the Nautilus file browser rendering(chaos picture) issue
Huang, FrankR
FrankR.Huang at amd.com
Fri Jul 2 01:00:34 PDT 2010
From: Frank Huang <frankr.huang at amd.com>
*With the PictOpOver and no Mask condition, when the srcX or SrcY
is greater than the source's picture, do the right rendering. When
the source has repeat attribute, do the PictOpOver; otherwise, do
none-op operation.
Signed-off-by: Frank Huang <frankr.huang at amd.com>
---
src/lx_exa.c | 36 ++++++++++++++++++++++++++++--------
1 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/src/lx_exa.c b/src/lx_exa.c
index eb35c89..f1b2a9b 100644
--- a/src/lx_exa.c
+++ b/src/lx_exa.c
@@ -1044,6 +1044,7 @@ lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX,
unsigned int dstOffset, srcOffset = 0;
int maskflag = 0;
+ int nothing = 0;
xPointFixed srcPoint;
@@ -1123,14 +1124,27 @@ lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX,
if ((exaScratch.srcHeight - maskY) < opHeight)
opHeight = exaScratch.srcHeight - maskY;
} else {
- if (exaScratch.srcWidth < opWidth)
- opWidth = exaScratch.srcWidth;
- if (exaScratch.srcHeight < opHeight)
- opHeight = exaScratch.srcHeight;
+ if (((exaScratch.srcWidth < srcX) || (exaScratch.srcHeight < srcY))
+ && (exaScratch.op == PictOpOver)) {
+ if (exaScratch.repeat == 1) {
+ opWidth = exaScratch.srcWidth;
+ opHeight = exaScratch.srcHeight;
+ srcOffset = GetSrcOffset(0, 0);
+ } else
+ nothing = 1;
+ } else {
+ if (exaScratch.srcWidth < opWidth)
+ opWidth = exaScratch.srcWidth;
+ if (exaScratch.srcHeight < opHeight)
+ opHeight = exaScratch.srcHeight;
+ }
}
while (1) {
+ if (nothing == 1)
+ break;
+
dstOffset = GetPixmapOffset(pxDst, opX, opY);
switch (exaScratch.type) {
@@ -1195,10 +1209,16 @@ lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX,
if (!exaScratch.maskrepeat)
break;
} 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.srcWidth < srcX) || (exaScratch.srcHeight < srcY))
+ &&(exaScratch.op == PictOpOver) && (exaScratch.repeat == 1))
+ break;
+ 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)
break;
}
--
1.7.1
More information about the Xorg-driver-geode
mailing list