[PATCH] Move GC->miTranslate flag to ScreenRec.

Jamey Sharp jamey at minilop.net
Sat Oct 1 23:23:30 PDT 2011


No DDX uses the ability to set this flag differently on different GCs.
When it's set at all, it was unconditionally set to true in a CreateGC
hook. Since CreateGC hooks are per-screen, just put the flag on the
screen instead.

fb sets miTranslate, so almost everything wants GC ops to be handed
screen-relative coordinates, but I can't easily prove that *everything*
uses fb. If the xfree86 driver API changed to unconditionally initialize
fb then it would be safe to delete the miTranslate flag outright.

Signed-off-by: Jamey Sharp <jamey at minilop.net>
---
This patch is based on my latest reviewed commits, though those aren't
merged to master yet. This commit is available in my xserver tree:
	git://anongit.freedesktop.org/~jamey/xserver miTranslate

This was originally part of a larger attempt to get non-protocol data
out of GC objects. I couldn't find a way to do that without getting lots
of people yelling at me, but I think this particular piece should be
uncontroversial.

Even better would be to prove that everyone always wants miTranslate
set, and just delete the flag. I suspect that's correct but I can't tell
for sure. Anyone have any ideas about how to find out?

 doc/Xserver-spec.xml         |   11 ++++-------
 fb/fbgc.c                    |    2 --
 fb/fbscreen.c                |    3 +++
 hw/xfree86/shadowfb/shadow.c |    6 +++---
 hw/xfree86/xaa/xaaFillArc.c  |    4 ++--
 hw/xnest/GC.c                |    2 --
 hw/xnest/Screen.c            |    2 ++
 hw/xwin/wingc.c              |    3 ---
 hw/xwin/winscrinit.c         |    3 +++
 include/gcstruct.h           |    3 +--
 include/scrnintstr.h         |    4 ++++
 mi/miarc.c                   |    6 +++---
 mi/mibitblt.c                |    4 ++--
 mi/midispcur.c               |    4 ++--
 mi/mifillarc.c               |    9 +++++----
 mi/mifillrct.c               |    3 ++-
 mi/mifpolycon.c              |    3 ++-
 mi/miglblt.c                 |    2 +-
 mi/mipoly.c                  |    5 +++--
 mi/mipolypnt.c               |    3 ++-
 mi/miwideline.c              |   11 ++++++-----
 mi/mizerarc.c                |    5 +++--
 mi/mizerline.c               |    6 +++---
 miext/damage/damage.c        |    6 +++---
 24 files changed, 59 insertions(+), 51 deletions(-)

diff --git a/doc/Xserver-spec.xml b/doc/Xserver-spec.xml
index 596a80a..d5a8b9b 100644
--- a/doc/Xserver-spec.xml
+++ b/doc/Xserver-spec.xml
@@ -4364,22 +4364,19 @@ they are aligned to the patOrg point in the GC.  This defaults to (0,
 <para>
 However, the mi routines can translate (relocate) the points from
 window-relative to screen-relative if desired.  If you set the
-miTranslate field in the GC (set it in the CreateGC or ValidateGC
-routine), then the mi output routines will translate all coordinates.
+miTranslate field in the ScreenRec during screen initialization, then
+the mi output routines will translate all coordinates.
 If it is false, then the coordinates will be passed window-relative.
 Screens with no hardware translation will probably set miTranslate to
 TRUE, so that geometry (e.g. polygons, rectangles) can be translated,
 rather than having the resulting list of scanlines translated; this is
-good because the list vertices in a drawing request will generally be
+good because the list of vertices in a drawing request will generally be
 much smaller than the list of scanlines it produces.  Similarly,
 hardware that does translation can set miTranslate to FALSE, and avoid
 the extra addition per vertex, which can be (but is not always)
 important for getting the highest possible performance.  (Contrast the
 behavior of GetSpans, which is not expected to be called as often, and
-so has different constraints.)  The miTranslate field is settable in
-each GC, if , for example, you are mixing several kinds of
-destinations (offscreen pixmaps, main memory pixmaps, backing store,
-and windows), all of which have different requirements, on one screen.</para>
+so has different constraints.)</para>
 <para>
 As with other drawing routines, there are fields in the GC to direct
 higher code to the correct routine to execute for each function.  In
diff --git a/fb/fbgc.c b/fb/fbgc.c
index aa75d7a..7d7a951 100644
--- a/fb/fbgc.c
+++ b/fb/fbgc.c
@@ -64,8 +64,6 @@ fbCreateGC(GCPtr pGC)
     pGC->ops = (GCOps *) &fbGCOps;
     pGC->funcs = (GCFuncs *) &fbGCFuncs;
 
-    /* fb wants to translate before scan conversion */
-    pGC->miTranslate = 1;
     pGC->fExpose = 1;
 
     fbGetGCPrivate(pGC)->bpp = BitsPerPixel (pGC->depth);
diff --git a/fb/fbscreen.c b/fb/fbscreen.c
index 9e6ecf5..4a25a30 100644
--- a/fb/fbscreen.c
+++ b/fb/fbscreen.c
@@ -133,6 +133,9 @@ fbSetupScreen(ScreenPtr	pScreen,
     pScreen->GetWindowPixmap = _fbGetWindowPixmap;
     pScreen->SetWindowPixmap = _fbSetWindowPixmap;
 
+    /* fb wants to translate before scan conversion */
+    pScreen->miTranslate = 1;
+
     return TRUE;
 }
 
diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c
index 499bbc3..b0e2870 100644
--- a/hw/xfree86/shadowfb/shadow.c
+++ b/hw/xfree86/shadowfb/shadow.c
@@ -469,7 +469,7 @@ ShadowFillSpans(
 
 	box.y2++;
 
-        if(!pGC->miTranslate) {
+        if(!pGC->pScreen->miTranslate) {
            TRANSLATE_BOX(box, pDraw);
         }
         TRIM_BOX(box, pGC); 
@@ -525,7 +525,7 @@ ShadowSetSpans(
 
 	box.y2++;
 
-        if(!pGC->miTranslate) {
+        if(!pGC->pScreen->miTranslate) {
            TRANSLATE_BOX(box, pDraw);
         }
         TRIM_BOX(box, pGC);
@@ -1606,7 +1606,7 @@ ShadowPushPixels(
 	box.x1 = xOrg;
 	box.y1 = yOrg;
 
-        if(!pGC->miTranslate) {
+        if(!pGC->pScreen->miTranslate) {
            box.x1 += pDraw->x;          
            box.y1 += pDraw->y;          
         }
diff --git a/hw/xfree86/xaa/xaaFillArc.c b/hw/xfree86/xaa/xaaFillArc.c
index 47d8041..549dd43 100644
--- a/hw/xfree86/xaa/xaaFillArc.c
+++ b/hw/xfree86/xaa/xaaFillArc.c
@@ -71,7 +71,7 @@ XAAFillEllipseSolid(DrawablePtr pDraw, GCPtr pGC, xArc *arc)
 
     miFillArcSetup(arc, &info);
     MIFILLARCSETUP();
-    if (pGC->miTranslate)
+    if (pGC->pScreen->miTranslate)
     {
 	xorg += pDraw->x;
 	yorg += pDraw->y;
@@ -129,7 +129,7 @@ XAAFillArcSliceSolid(DrawablePtr pDraw, GCPtr pGC, xArc *arc)
     slw = arc->height;
     if (slice.flip_top || slice.flip_bot)
 	slw += (arc->height >> 1) + 1;
-    if (pGC->miTranslate)
+    if (pGC->pScreen->miTranslate)
     {
 	xorg += pDraw->x;
 	yorg += pDraw->y;
diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c
index 5f9d224..e7f0d50 100644
--- a/hw/xnest/GC.c
+++ b/hw/xnest/GC.c
@@ -73,8 +73,6 @@ xnestCreateGC(GCPtr pGC)
   pGC->funcs = &xnestFuncs;
   pGC->ops = &xnestOps;
   
-  pGC->miTranslate = 1;
-   
   xnestGCPriv(pGC)->gc = XCreateGC(xnestDisplay, 
 				   xnestDefaultDrawables[pGC->depth], 
 				   0L, NULL);
diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c
index d0c7fc8..9079cd6 100644
--- a/hw/xnest/Screen.c
+++ b/hw/xnest/Screen.c
@@ -256,6 +256,8 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
   /* GCPrivateSizes */
   /* totalGCSize */
 
+  pScreen->miTranslate = 1;
+
   /* Random screen procedures */
 
   pScreen->QueryBestSize = xnestQueryBestSize;
diff --git a/hw/xwin/wingc.c b/hw/xwin/wingc.c
index 09e9968..9600448 100644
--- a/hw/xwin/wingc.c
+++ b/hw/xwin/wingc.c
@@ -123,9 +123,6 @@ winCreateGCNativeGDI (GCPtr pGC)
   pGC->ops = (GCOps *) &winGCOps;
   pGC->funcs = (GCFuncs *) &winGCFuncs;
 
-  /* We want all coordinates passed to spans functions to be screen relative */
-  pGC->miTranslate = TRUE;
-
   /* Allocate privates for this GC */
   pGCPriv = winGetGCPriv (pGC);
   if (pGCPriv == NULL)
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index 983ff57..10f76bf 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -672,6 +672,9 @@ winFinishScreenInitNativeGDI (int index,
       return FALSE;
     }
 
+  /* We want all coordinates passed to spans functions to be screen relative */
+  pScreen->miTranslate = TRUE;
+
   pScreen->defColormap = FakeClientID(0);
 
   /*
diff --git a/include/gcstruct.h b/include/gcstruct.h
index ed598fc..07872a2 100644
--- a/include/gcstruct.h
+++ b/include/gcstruct.h
@@ -278,12 +278,11 @@ typedef struct _GC {
     unsigned int 	arcMode : 1;
     unsigned int	subWindowMode : 1;
     unsigned int	graphicsExposures : 1;
-    unsigned int	miTranslate:1; /* should mi things translate? */
     unsigned int	tileIsPixel:1; /* tile is solid pixel */
     unsigned int	fExpose:1;     /* Call exposure handling */
     unsigned int	freeCompClip:1;  /* Free composite clip */
     unsigned int	scratch_inuse:1; /* is this GC in a pool for reuse? */
-    unsigned int	unused:15; /* see comment above */
+    unsigned int	unused:16; /* see comment above */
     unsigned long	planemask;
     unsigned long	fgPixel;
     unsigned long	bgPixel;
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index a9357e8..3e4728b 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -419,6 +419,10 @@ typedef struct _Screen {
     short		minInstalledCmaps, maxInstalledCmaps;
     char                backingStoreSupport, saveUnderSupport;
     unsigned long	whitePixel, blackPixel;
+
+    unsigned int	miTranslate : 1;
+    unsigned int	unusedFlags : 31;
+
     GCPtr		GCperDepth[MAXFORMATS+1];
 			/* next field is a stipple to use as default in
 			   a GC.  we don't build default tiles of all depths
diff --git a/mi/miarc.c b/mi/miarc.c
index cd870fa..74d103b 100644
--- a/mi/miarc.c
+++ b/mi/miarc.c
@@ -262,7 +262,7 @@ miArcSegment(
 	return;
     }
 
-    if (pGC->miTranslate) {
+    if (pGC->pScreen->miTranslate) {
 	tarc.x += pDraw->x;
 	tarc.y += pDraw->y;
     }
@@ -837,7 +837,7 @@ miFillWideEllipse(
     xorg = parc->x + (parc->width >> 1);
     yorgu = parc->y + (parc->height >> 1);
     yorgl = yorgu + (parc->height & 1);
-    if (pGC->miTranslate)
+    if (pGC->pScreen->miTranslate)
     {
 	xorg += pDraw->x;
 	yorgu += pDraw->y;
@@ -1024,7 +1024,7 @@ miPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
 		parc->x -= xOrg;
 		parc->y -= yOrg;
 	    }
-	    if (pGC->miTranslate)
+	    if (pGC->pScreen->miTranslate)
 	    {
 		xOrg += pDraw->x;
 		yOrg += pDraw->y;
diff --git a/mi/mibitblt.c b/mi/mibitblt.c
index e302960..a912a24 100644
--- a/mi/mibitblt.c
+++ b/mi/mibitblt.c
@@ -137,7 +137,7 @@ miCopyArea(DrawablePtr  pSrcDrawable,
 
     dstx = xOut;
     dsty = yOut;
-    if (pGC->miTranslate)
+    if (pGC->pScreen->miTranslate)
     {
 	dstx += pDstDrawable->x;
 	dsty += pDstDrawable->y;
@@ -800,7 +800,7 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth,
            free(pptFirst);
            return;
         }
-	if (pGC->miTranslate)
+	if (pGC->pScreen->miTranslate)
 	{
 	    x += pDraw->x;
 	    y += pDraw->y;
diff --git a/mi/midispcur.c b/mi/midispcur.c
index 32c5c9d..a830d92 100644
--- a/mi/midispcur.c
+++ b/mi/midispcur.c
@@ -343,7 +343,7 @@ miDCPutBits (
     if (sourceGC->serialNumber != pDrawable->serialNumber)
 	ValidateGC (pDrawable, sourceGC);
 
-    if(sourceGC->miTranslate) 
+    if(sourceGC->pScreen->miTranslate)
     {
         x = pDrawable->x + x_org;
         y = pDrawable->y + y_org;
@@ -363,7 +363,7 @@ miDCPutBits (
     if (maskGC->serialNumber != pDrawable->serialNumber)
 	ValidateGC (pDrawable, maskGC);
 
-    if(maskGC->miTranslate) 
+    if(maskGC->pScreen->miTranslate)
     {
         x = pDrawable->x + x_org;
         y = pDrawable->y + y_org;
diff --git a/mi/mifillarc.c b/mi/mifillarc.c
index 6e13e68..98ad1de 100644
--- a/mi/mifillarc.c
+++ b/mi/mifillarc.c
@@ -40,6 +40,7 @@ Author:  Bob Scheifler, MIT X Consortium
 #include "mifpoly.h"
 #include "mi.h"
 #include "mifillarc.h"
+#include "scrnintstr.h"
 
 #define QUADRANT (90 * 64)
 #define HALFCIRCLE (180 * 64)
@@ -557,7 +558,7 @@ miFillEllipseI(
     }
     miFillArcSetup(arc, &info);
     MIFILLARCSETUP();
-    if (pGC->miTranslate)
+    if (pGC->pScreen->miTranslate)
     {
 	xorg += pDraw->x;
 	yorg += pDraw->y;
@@ -600,7 +601,7 @@ miFillEllipseD(
     }
     miFillArcDSetup(arc, &info);
     MIFILLARCSETUP();
-    if (pGC->miTranslate)
+    if (pGC->pScreen->miTranslate)
     {
 	xorg += pDraw->x;
 	yorg += pDraw->y;
@@ -670,7 +671,7 @@ miFillArcSliceI(
 	free(points);
 	return;
     }
-    if (pGC->miTranslate)
+    if (pGC->pScreen->miTranslate)
     {
 	xorg += pDraw->x;
 	yorg += pDraw->y;
@@ -734,7 +735,7 @@ miFillArcSliceD(
 	free(points);
 	return;
     }
-    if (pGC->miTranslate)
+    if (pGC->pScreen->miTranslate)
     {
 	xorg += pDraw->x;
 	yorg += pDraw->y;
diff --git a/mi/mifillrct.c b/mi/mifillrct.c
index 1c63a35..7a01e37 100644
--- a/mi/mifillrct.c
+++ b/mi/mifillrct.c
@@ -56,6 +56,7 @@ SOFTWARE.
 #include "pixmap.h"
 #include "mi.h"
 #include "misc.h"
+#include "scrnintstr.h"
 
 /* mi rectangles
    written by newman, with debts to all and sundry
@@ -86,7 +87,7 @@ miPolyFillRect(
     int	*pwFirst;
     int *pw;
 
-    if (pGC->miTranslate)
+    if (pGC->pScreen->miTranslate)
     {
 	xorg = pDrawable->x;
 	yorg = pDrawable->y;
diff --git a/mi/mifpolycon.c b/mi/mifpolycon.c
index e48686a..b547d14 100644
--- a/mi/mifpolycon.c
+++ b/mi/mifpolycon.c
@@ -54,6 +54,7 @@ SOFTWARE.
 #include "windowstr.h"
 #include "pixmapstr.h"
 #include "mifpoly.h"
+#include "scrnintstr.h"
 
 static int GetFPolyYBounds(SppPointPtr pts, int n, double yFtrans,
 			   int *by, int *ty);
@@ -105,7 +106,7 @@ miFillSppPoly(
     DDXPointPtr 	ptsOut,
     			FirstPoint;	/* output buffer */
 
-    if (pgc->miTranslate)
+    if (pgc->pScreen->miTranslate)
     {
 	xTrans += dst->x;
 	yTrans += dst->y;
diff --git a/mi/miglblt.c b/mi/miglblt.c
index 9edb500..1ba8433 100644
--- a/mi/miglblt.c
+++ b/mi/miglblt.c
@@ -109,7 +109,7 @@ miPolyGlyphBlt(
 
     ChangeGCVal gcvals[3];
 
-    if (pGC->miTranslate)
+    if (pGC->pScreen->miTranslate)
     {
 	x += pDrawable->x;
 	y += pDrawable->y;
diff --git a/mi/mipoly.c b/mi/mipoly.c
index b3e2c2f..974cf95 100644
--- a/mi/mipoly.c
+++ b/mi/mipoly.c
@@ -50,7 +50,7 @@ SOFTWARE.
  *  Written by Brian Kelleher; June 1986
  *
  *  Draw polygons.  This routine translates the point by the
- *  origin if pGC->miTranslate is non-zero, and calls
+ *  origin if pGC->pScreen->miTranslate is non-zero, and calls
  *  to the appropriate routine to actually scan convert the
  *  polygon.
  */
@@ -64,6 +64,7 @@ SOFTWARE.
 #include "pixmapstr.h"
 #include "mi.h"
 #include "regionstr.h"
+#include "scrnintstr.h"
 
 
 void
@@ -79,7 +80,7 @@ miFillPolygon( DrawablePtr dst, GCPtr pgc,
 	return;
 
     ppt = pPts;
-    if (pgc->miTranslate)
+    if (pgc->pScreen->miTranslate)
     {
 	xorg = dst->x;
 	yorg = dst->y;
diff --git a/mi/mipolypnt.c b/mi/mipolypnt.c
index 3e43a52..f778662 100644
--- a/mi/mipolypnt.c
+++ b/mi/mipolypnt.c
@@ -54,6 +54,7 @@ SOFTWARE.
 #include "gcstruct.h"
 #include "windowstr.h"
 #include "mi.h"
+#include "scrnintstr.h"
 
 void
 miPolyPoint(
@@ -90,7 +91,7 @@ miPolyPoint(
 	}
     }
 
-    if(pGC->miTranslate)
+    if(pGC->pScreen->miTranslate)
     {
 	ppt = pptInit;
 	nptTmp = npt;
diff --git a/mi/miwideline.c b/mi/miwideline.c
index 057339d..0ae49a7 100644
--- a/mi/miwideline.c
+++ b/mi/miwideline.c
@@ -51,6 +51,7 @@ from The Open Group.
 #include "regionstr.h"
 #include "miwideline.h"
 #include "mi.h"
+#include "scrnintstr.h"
 
 static Bool
 InitSpans(Spans *spans, size_t nspans)
@@ -161,7 +162,7 @@ miFillPolyHelper (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel,
     pwidth = spanRec.widths;
 
     xorg = 0;
-    if (pGC->miTranslate)
+    if (pGC->pScreen->miTranslate)
     {
 	y += pDrawable->y;
 	xorg = pDrawable->x;
@@ -278,7 +279,7 @@ miFillRectPolyHelper (
 	ppt = spanRec.points;
 	pwidth = spanRec.widths;
 
-    	if (pGC->miTranslate)
+	if (pGC->pScreen->miTranslate)
     	{
 	    y += pDrawable->y;
 	    x += pDrawable->x;
@@ -494,7 +495,7 @@ miLineOnePoint (
     else
     {
 	wid = 1;
-	if (pGC->miTranslate) 
+	if (pGC->pScreen->miTranslate)
 	{
 	    x += pDrawable->x;
 	    y += pDrawable->y;
@@ -671,7 +672,7 @@ miLineArcI (
 
     tpts = points;
     twids = widths;
-    if (pGC->miTranslate)
+    if (pGC->pScreen->miTranslate)
     {
 	xorg += pDraw->x;
 	yorg += pDraw->y;
@@ -772,7 +773,7 @@ miLineArcD (
     x0 = xorg - xbase;
     ybase = ICEIL (yorg);
     y0 = yorg - ybase;
-    if (pGC->miTranslate)
+    if (pGC->pScreen->miTranslate)
     {
 	xbase += pDraw->x;
 	ybase += pDraw->y;
diff --git a/mi/mizerarc.c b/mi/mizerarc.c
index 5adf3dd..d01d050 100644
--- a/mi/mizerarc.c
+++ b/mi/mizerarc.c
@@ -45,6 +45,7 @@ Author:  Bob Scheifler, MIT X Consortium
 #include "pixmapstr.h"
 #include "mi.h"
 #include "mizerarc.h"
+#include "scrnintstr.h"
 
 #define FULLCIRCLE (360 * 64)
 #define OCTANT (45 * 64)
@@ -788,7 +789,7 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
 		    while (maxw < n)
 			widths[maxw++] = 1;
 		}
-		if (pGC->miTranslate)
+		if (pGC->pScreen->miTranslate)
 		{
 		    for (pt = points; pt != pts; pt++)
 		    {
@@ -820,7 +821,7 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
 		    while (maxw < n)
 			widths[maxw++] = 1;
 		}
-		if (pGC->miTranslate)
+		if (pGC->pScreen->miTranslate)
 		{
 		    for (pt = oddPts; pt != pts; pt++)
 		    {
diff --git a/mi/mizerline.c b/mi/mizerline.c
index 7077b51..57385fd 100644
--- a/mi/mizerline.c
+++ b/mi/mizerline.c
@@ -130,7 +130,7 @@ miZeroLine(
     xright  = pDraw->x + pDraw->width - 1;
     ybottom = pDraw->y + pDraw->height - 1;
 
-    if (!pGC->miTranslate)
+    if (!pGC->pScreen->miTranslate)
     {
 	/* do everything in drawable-relative coordinates */
 	xleft    = 0;
@@ -170,7 +170,7 @@ miZeroLine(
 
     xstart = ppt->x;
     ystart = ppt->y;
-    if (pGC->miTranslate)
+    if (pGC->pScreen->miTranslate)
     {
 	xstart += pDraw->x;
 	ystart += pDraw->y;
@@ -201,7 +201,7 @@ miZeroLine(
 
 	x2 = ppt->x;
 	y2 = ppt->y;
-	if (pGC->miTranslate && (mode != CoordModePrevious))
+	if (pGC->pScreen->miTranslate && (mode != CoordModePrevious))
 	{
 	    x2 += pDraw->x;
 	    y2 += pDraw->y;
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index a24b6cc..a7fb3ab 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -707,7 +707,7 @@ damageFillSpans(DrawablePtr pDrawable,
 
 	box.y2++;
 
-        if(!pGC->miTranslate) {
+        if(!pGC->pScreen->miTranslate) {
            TRANSLATE_BOX(box, pDrawable);
         }
         TRIM_BOX(box, pGC); 
@@ -757,7 +757,7 @@ damageSetSpans(DrawablePtr  pDrawable,
 
 	box.y2++;
 
-        if(!pGC->miTranslate) {
+        if(!pGC->pScreen->miTranslate) {
            TRANSLATE_BOX(box, pDrawable);
         }
         TRIM_BOX(box, pGC); 
@@ -1548,7 +1548,7 @@ damagePushPixels(GCPtr		pGC,
         box.x1 = xOrg;
         box.y1 = yOrg;
 
-        if(!pGC->miTranslate) {
+        if(!pGC->pScreen->miTranslate) {
            box.x1 += pDrawable->x;          
            box.y1 += pDrawable->y;          
         }
-- 
1.7.5.4



More information about the xorg-devel mailing list