From f0ba303d48439e0ebb572d56db972995388ac865 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 1 May 2019 15:04:26 +0200 Subject: NXdamage.c: add missing upstream fixes Some of those fixes have been part of xorg's INITIAL damage.c from 2004. They where missing in NX nevertheless. The other fixes come from this commit: commit fec868bf0f67a8f62fc69d55e2ff72b6cacea6f8 Author: Roland Mainz Date: Tue Nov 23 17:10:55 2004 +0000 //freedesktop.org/bugzilla/show_bug.cgi?id=1204): Fix X11 test suite (caused by DAMAGE layer) failure with Xvfb when rendering text using |XDrawText*()| (XDrawText() tests 1, 3, 4, 27, 28, 29, 30, 34, 37, 39, 41, 43 and XDrawText16() tests 1, 3, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 34, 37, 39, 41, 43). Patch by Hong Bo Peng and Stefan Dirsch . --- nx-X11/programs/Xserver/hw/nxagent/NXdamage.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'nx-X11/programs/Xserver/hw') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdamage.c b/nx-X11/programs/Xserver/hw/nxagent/NXdamage.c index ad02e13a8..ef50edbee 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdamage.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdamage.c @@ -154,10 +154,10 @@ damagePolyText8(DrawablePtr pDrawable, DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); if (checkGCDamage (pDrawable, pGC)) - damageText (pDrawable, pGC, x, y, (unsigned long) count, chars, + x = damageText (pDrawable, pGC, x, y, (unsigned long) count, chars, Linear8Bit, TT_POLY8); - - x = (*pGC->ops->PolyText8)(pDrawable, pGC, x, y, count, chars); + else + x = (*pGC->ops->PolyText8)(pDrawable, pGC, x, y, count, chars); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); return x; @@ -174,11 +174,11 @@ damagePolyText16(DrawablePtr pDrawable, DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); if (checkGCDamage (pDrawable, pGC)) - damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars, + x = damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars, FONTLASTROW(pGC->font) == 0 ? Linear16Bit : TwoD16Bit, TT_POLY16); - - x = (*pGC->ops->PolyText16)(pDrawable, pGC, x, y, count, chars); + else + x = (*pGC->ops->PolyText16)(pDrawable, pGC, x, y, count, chars); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); return x; @@ -197,8 +197,8 @@ damageImageText8(DrawablePtr pDrawable, if (checkGCDamage (pDrawable, pGC)) damageText (pDrawable, pGC, x, y, (unsigned long) count, chars, Linear8Bit, TT_IMAGE8); - - (*pGC->ops->ImageText8)(pDrawable, pGC, x, y, count, chars); + else + (*pGC->ops->ImageText8)(pDrawable, pGC, x, y, count, chars); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } @@ -217,8 +217,8 @@ damageImageText16(DrawablePtr pDrawable, damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars, FONTLASTROW(pGC->font) == 0 ? Linear16Bit : TwoD16Bit, TT_IMAGE16); - - (*pGC->ops->ImageText16)(pDrawable, pGC, x, y, count, chars); + else + (*pGC->ops->ImageText16)(pDrawable, pGC, x, y, count, chars); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } -- cgit v1.2.3