CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa

2012-11-02 Thread Alan Barrett
Module Name:xsrc
Committed By:   apb
Date:   Fri Nov  2 07:33:47 UTC 2012

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa: xaaPCache.c

Log Message:
Add parentheses in code that attempts to convert 3 bytes to a 24-bit value.
+ has higher precedence than , so the old code would have given
incorrect results.  Found using clang -Wshift-op-parentheses.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c:1.2 xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c:1.3
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c:1.2	Tue Nov 30 11:09:01 2010
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c	Fri Nov  2 07:33:47 2012
@@ -1198,10 +1198,10 @@ load_24bits(void *where)
 }
 
 #if X_BYTE_ORDER == X_LITTLE_ENDIAN
-return bytes[2]  16 + bytes[1]  8 + bytes[0];
+return (bytes[2]  16) + (bytes[1]  8) + bytes[0];
 #endif
 #if X_BYTE_ORDER == X_BIG_ENDIAN
-return bytes[0]  16 + bytes[1]  8 + bytes[2];
+return (bytes[0]  16) + (bytes[1]  8) + bytes[2];
 #endif
 }
 



CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa

2010-11-30 Thread Nick Hudson
Module Name:xsrc
Committed By:   skrll
Date:   Tue Nov 30 11:09:02 UTC 2010

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa: xaaPCache.c

Log Message:
Avoid unaligned accesses.

Needed to make my CATS start X without an xorg.conf.

Reviewed and tested by macal...@. thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c:1.1.1.3 xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c:1.2
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c:1.1.1.3	Tue Nov 23 05:21:41 2010
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaPCache.c	Tue Nov 30 11:09:01 2010
@@ -1188,6 +1188,22 @@
 return TRUE;
 }
 
+static inline CARD32
+load_24bits(void *where)
+{
+unsigned char *bytes = where;
+
+if (__predict_true(((uintptr_t)where  0x3) == 0)) {
+return (*(CARD32 *)where)  0x00ff;
+}
+
+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
+return bytes[2]  16 + bytes[1]  8 + bytes[0];
+#endif
+#if X_BYTE_ORDER == X_BIG_ENDIAN
+return bytes[0]  16 + bytes[1]  8 + bytes[2];
+#endif
+}
 
 Bool
 XAACheckTileReducibility(PixmapPtr pPixmap, Bool checkMono)
@@ -1323,13 +1339,13 @@
 	} else if(pPixmap-drawable.bitsPerPixel == 24) {
 	CARD32 val;
 	unsigned char *srcp = pPixmap-devPrivate.ptr;
-	fg = *((CARD32*)srcp)  0x00FF;
+	fg = load_24bits(srcp);
 	pitch = pPixmap-devKind;
 	j *= 3;
 	for(y = 0; y  i; y++) {
 		bits[y] = 0;
 		for(x = 0; x  j; x+=3) {
-		   val = *((CARD32*)(srcp+x))  0x00FF;
+		   val = load_24bits(srcp+x);
 		   if(val != fg) {
 			if(bg == -1) bg = val;
 			else if(bg != val) 



CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa

2010-11-23 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Tue Nov 23 08:15:57 UTC 2010

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa: xaalocal.h

Log Message:
re-merge our local change to add XAAFillScanlineImageWriteRects()


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.6 xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.7
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.6	Tue Nov 23 06:38:11 2010
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h	Tue Nov 23 08:15:56 2010
@@ -595,6 +595,17 @@
 PixmapPtr pPix
 );
 
+void 
+XAAFillScanlineImageWriteRects(
+ScrnInfoPtr pScrn,
+int rop,
+unsigned int planemask,
+int nBox,
+BoxPtr pBox,
+int xorg, int yorg,
+PixmapPtr pPix
+);
+
 extern _X_EXPORT void
 XAAPolyFillRect(
 DrawablePtr pDraw,



CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa

2009-10-06 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Tue Oct  6 06:22:58 UTC 2009

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa: xaaGC.c xaalocal.h

Log Message:
simplify PIXMAP_IS_SCREEN()


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.2 xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.3
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.2	Tue Sep 29 20:42:54 2009
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c	Tue Oct  6 06:22:58 2009
@@ -89,7 +89,8 @@
 }
 
 if((pDraw-type == DRAWABLE_PIXMAP)  
-   !IS_OFFSCREEN_PIXMAP(pDraw)  !PIXMAP_IS_SCREEN((PixmapPtr)pDraw, pGC)) {
+   !IS_OFFSCREEN_PIXMAP(pDraw)  
+   !PIXMAP_IS_SCREEN(pDraw)) {
 	pGCPriv-flags = OPS_ARE_PIXMAP;
 pGCPriv-changes |= changes;
 

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.4 xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.5
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.4	Tue Sep 29 20:42:54 2009
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h	Tue Oct  6 06:22:58 2009
@@ -1710,8 +1710,8 @@
 #define IS_OFFSCREEN_PIXMAP(pPix)\
 ((XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pPix)))-offscreenArea)	
 
-#define PIXMAP_IS_SCREEN(pPix, pGC)\
-(pPix == pGC-pScreen-GetScreenPixmap(pGC-pScreen))
+#define PIXMAP_IS_SCREEN(pDraw)\
+(pDraw == (void *)pDraw-pScreen-GetScreenPixmap(pDraw-pScreen))
  
 #define PIXMAP_IS_SHARED(pPix)\
 ((XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pPix)))-flags  SHARED_PIXMAP)



CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa

2009-09-29 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Tue Sep 29 20:42:54 UTC 2009

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa: xaaGC.c xaalocal.h

Log Message:
don't fall back to software rendering when drawing into the screen pixmap
this takes care of visible artifacts with non-mappable framebuffers like
newport and crime


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.1.1.2 xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.2
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.1.1.2	Thu Jun 11 01:52:58 2009
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c	Tue Sep 29 20:42:54 2009
@@ -88,7 +88,8 @@
 	pGC-fgPixel = 0x7fff;
 }
 
-if((pDraw-type == DRAWABLE_PIXMAP)  !IS_OFFSCREEN_PIXMAP(pDraw)){
+if((pDraw-type == DRAWABLE_PIXMAP)  
+   !IS_OFFSCREEN_PIXMAP(pDraw)  !PIXMAP_IS_SCREEN((PixmapPtr)pDraw, pGC)) {
 	pGCPriv-flags = OPS_ARE_PIXMAP;
 pGCPriv-changes |= changes;
 

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.3 xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.4
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.3	Thu Jun 11 02:13:52 2009
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h	Tue Sep 29 20:42:54 2009
@@ -1710,6 +1710,9 @@
 #define IS_OFFSCREEN_PIXMAP(pPix)\
 ((XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pPix)))-offscreenArea)	
 
+#define PIXMAP_IS_SCREEN(pPix, pGC)\
+(pPix == pGC-pScreen-GetScreenPixmap(pGC-pScreen))
+ 
 #define PIXMAP_IS_SHARED(pPix)\
 ((XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pPix)))-flags  SHARED_PIXMAP)