[Xorg-commit] xc/programs/Xserver/fb fbcopy.c,1.1.4.1,1.1.4.2

Kaleb Keithley xorg-commit at pdx.freedesktop.org
Wed May 9 17:30:30 EEST 2007


Committed by: kaleb

Update of /cvs/xorg/xc/programs/Xserver/fb
In directory pdx:/home/kaleb/xorg/xc.XORG-CURRENT/programs/Xserver/fb

Modified Files:
      Tag: XORG-CURRENT
	fbcopy.c 
Log Message:
merge most of XFree86 RC3 (4.3.99.903) from vendor branch.
bug #214


Index: fbcopy.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/fb/fbcopy.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/fbcopy.c	26 Nov 2003 22:48:43 -0000	1.1.4.1
+++ b/fbcopy.c	23 Feb 2004 21:35:04 -0000	1.1.4.2
@@ -21,7 +21,7 @@
  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  * PERFORMANCE OF THIS SOFTWARE.
  */
-/* $XFree86: xc/programs/Xserver/fb/fbcopy.c,v 1.13 2003/11/10 18:21:47 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbcopy.c,v 1.14 2003/12/28 17:22:25 alanh Exp $ */
 
 #include "fb.h"
 #ifdef IN_MODULE
@@ -398,7 +398,10 @@
     int		dx;
     int		dy;
     int		numRects;
-    BoxRec	box;
+    int         box_x1;
+    int         box_y1;
+    int         box_x2;
+    int         box_y2;
     Bool	fastSrc = FALSE;    /* for fast clipping with pixmap source */
     Bool	fastDst = FALSE;    /* for fast clipping with one rect dest */
     Bool	fastExpose = FALSE; /* for fast exposures with pixmap source */
@@ -466,10 +469,10 @@
     xOut += pDstDrawable->x;
     yOut += pDstDrawable->y;
 
-    box.x1 = xIn;
-    box.y1 = yIn;
-    box.x2 = xIn + widthSrc;
-    box.y2 = yIn + heightSrc;
+    box_x1 = xIn;
+    box_y1 = yIn;
+    box_x2 = xIn + widthSrc;
+    box_y2 = yIn + heightSrc;
 
     dx = xIn - xOut;
     dy = yIn - yOut;
@@ -484,32 +487,32 @@
 	 * clip the source; if regions extend beyond the source size,
  	 * make sure exposure events get sent
 	 */
-	if (box.x1 < pSrcDrawable->x)
+	if (box_x1 < pSrcDrawable->x)
 	{
-	    box.x1 = pSrcDrawable->x;
+	    box_x1 = pSrcDrawable->x;
 	    fastExpose = FALSE;
 	}
-	if (box.y1 < pSrcDrawable->y)
+	if (box_y1 < pSrcDrawable->y)
 	{
-	    box.y1 = pSrcDrawable->y;
+	    box_y1 = pSrcDrawable->y;
 	    fastExpose = FALSE;
 	}
-	if (box.x2 > pSrcDrawable->x + (int) pSrcDrawable->width)
+	if (box_x2 > pSrcDrawable->x + (int) pSrcDrawable->width)
 	{
-	    box.x2 = pSrcDrawable->x + (int) pSrcDrawable->width;
+	    box_x2 = pSrcDrawable->x + (int) pSrcDrawable->width;
 	    fastExpose = FALSE;
 	}
-	if (box.y2 > pSrcDrawable->y + (int) pSrcDrawable->height)
+	if (box_y2 > pSrcDrawable->y + (int) pSrcDrawable->height)
 	{
-	    box.y2 = pSrcDrawable->y + (int) pSrcDrawable->height;
+	    box_y2 = pSrcDrawable->y + (int) pSrcDrawable->height;
 	    fastExpose = FALSE;
 	}
 	
 	/* Translate and clip the dst to the destination composite clip */
-        box.x1 -= dx;
-        box.x2 -= dx;
-        box.y1 -= dy;
-        box.y2 -= dy;
+        box_x1 -= dx;
+        box_x2 -= dx;
+        box_y1 -= dy;
+        box_y2 -= dy;
 
 	/* If the destination composite clip is one rectangle we can
 	   do the clip directly.  Otherwise we have to create a full
@@ -520,21 +523,26 @@
         {
 	    BoxPtr pBox = REGION_RECTS(cclip);
 
-	    if (box.x1 < pBox->x1) box.x1 = pBox->x1;
-	    if (box.x2 > pBox->x2) box.x2 = pBox->x2;
-	    if (box.y1 < pBox->y1) box.y1 = pBox->y1;
-	    if (box.y2 > pBox->y2) box.y2 = pBox->y2;
+	    if (box_x1 < pBox->x1) box_x1 = pBox->x1;
+	    if (box_x2 > pBox->x2) box_x2 = pBox->x2;
+	    if (box_y1 < pBox->y1) box_y1 = pBox->y1;
+	    if (box_y2 > pBox->y2) box_y2 = pBox->y2;
 	    fastDst = TRUE;
 	}
     }
     
     /* Check to see if the region is empty */
-    if (box.x1 >= box.x2 || box.y1 >= box.y2)
+    if (box_x1 >= box_x2 || box_y1 >= box_y2)
     {
 	REGION_NULL(pGC->pScreen, &rgnDst);
     }
     else
     {
+        BoxRec	box;
+	box.x1 = box_x1;
+	box.y1 = box_y1;
+	box.x2 = box_x2;
+	box.y2 = box_y2;
 	REGION_INIT(pGC->pScreen, &rgnDst, &box, 1);
     }
     





More information about the xorg-commit mailing list