Pixman call needed a wrapper to fix some rendering problems in Xming

Colin Harrison colin.harrison at virgin.net
Sat Jun 16 06:36:26 PDT 2007


Hi,
I get bad rendering with xterm X clients (and others) in Xming following a
recent git change in pixman/xserver.
(typically, Cursor goes bananas and various types of page corruption)

Traced back to recent changes in fb/fbfill.c and fixed by wrapping a call to
pixman_fill() with
a fresh call to fbGetDrawable().
This is the fix (or bodge!) that works for me...

--- ./xserver/fb/save_fbfill.c	2007-06-12 07:42:19.000000000 +0100
+++ ./xserver/fb/fbfill.c	2007-06-16 13:37:50.000000000 +0100
@@ -28,6 +28,9 @@
 
 #include "fb.h"
 
+static Bool
+wrapSolidFill (DrawablePtr pDraw, int x, int y, int width, int height,
FbBits xor);
+
 void
 fbFill (DrawablePtr pDrawable,
 	GCPtr	    pGC,
@@ -220,9 +223,10 @@
 #ifndef FB_ACCESS_WRAPPER
 	if (!and)
 	{
-	    if (pixman_fill (dst, dstStride, dstBpp,
-			     partX1 + dstXoff, partX2 + dstYoff, (partX2 -
partX1), (partY2 - partY1),
-			     xor))
+	    if (wrapSolidFill (pDrawable,
+				partX1, partY1,
+			    	(partX2 - partX1), (partY2 - partY1),
+				xor))
 	    {
 		fbFinishAccess (pDrawable);
 		return;
@@ -240,3 +244,16 @@
     }
     fbFinishAccess (pDrawable);
 }
+
+static Bool
+wrapSolidFill (DrawablePtr pDraw, int x, int y, int width, int height,
FbBits xor)
+{ 
+    FbStride	stride;
+    int		bpp;
+    FbBits      *bits;
+    int		xoff, yoff;
+    
+    fbGetDrawable(pDraw, bits, stride, bpp, xoff, yoff);
+
+    return pixman_fill (bits, stride, bpp, x + xoff, y + yoff, width,
height, xor);
+}

Thanks
Colin Harrison




More information about the xorg mailing list