summaryrefslogtreecommitdiff
path: root/fb
diff options
context:
space:
mode:
authorAdam Jackson <ajax@benzedrine.nwnk.net>2006-10-11 15:56:45 -0400
committerAdam Jackson <ajax@benzedrine.nwnk.net>2006-10-11 15:56:45 -0400
commit61f3eb816b47f31e856eca32bca7e2e947faf533 (patch)
tree712ac5ae1988ddedff4153e0b05f8c08c1f4f70d /fb
parentcde68728860179dc84e615ccb378ce992513fd62 (diff)
Back out merge of master to 1.2 branch. Undoes 89987ca...
Dear git: please make 'git-revert' work on merge commits kthnxbye.
Diffstat (limited to 'fb')
-rw-r--r--fb/Makefile.am10
-rw-r--r--fb/fb.h118
-rw-r--r--fb/fb24_32.c74
-rw-r--r--fb/fballpriv.c5
-rw-r--r--fb/fbarc.c1
-rw-r--r--fb/fbbits.c16
-rw-r--r--fb/fbbits.h35
-rw-r--r--fb/fbblt.c138
-rw-r--r--fb/fbbltone.c96
-rw-r--r--fb/fbcompose.c663
-rw-r--r--fb/fbcopy.c10
-rw-r--r--fb/fbedge.c16
-rw-r--r--fb/fbedgeimp.h10
-rw-r--r--fb/fbfill.c13
-rw-r--r--fb/fbgc.c13
-rw-r--r--fb/fbgetsp.c2
-rw-r--r--fb/fbglyph.c18
-rw-r--r--fb/fbimage.c6
-rw-r--r--fb/fbpict.c109
-rw-r--r--fb/fbpict.h29
-rw-r--r--fb/fbpixmap.c12
-rw-r--r--fb/fbpoint.c7
-rw-r--r--fb/fbpseudocolor.c6
-rw-r--r--fb/fbpush.c7
-rw-r--r--fb/fbscreen.c40
-rw-r--r--fb/fbseg.c28
-rw-r--r--fb/fbsetsp.c1
-rw-r--r--fb/fbsolid.c42
-rw-r--r--fb/fbstipple.c6
-rw-r--r--fb/fbtile.c6
-rw-r--r--fb/fbtrap.c4
-rw-r--r--fb/fbwindow.c8
-rw-r--r--fb/wfbrename.h198
33 files changed, 628 insertions, 1119 deletions
diff --git a/fb/Makefile.am b/fb/Makefile.am
index 9a56b9302..11b2d2fea 100644
--- a/fb/Makefile.am
+++ b/fb/Makefile.am
@@ -1,4 +1,4 @@
-noinst_LTLIBRARIES = libfb.la libwfb.la libfbmmx.la
+noinst_LTLIBRARIES = libfb.la libfbmmx.la
INCLUDES = \
-I$(top_srcdir)/hw/xfree86/os-support \
@@ -7,11 +7,11 @@ INCLUDES = \
AM_CFLAGS = $(DIX_CFLAGS)
if XORG
-sdk_HEADERS = fb.h fbrop.h fbpseudocolor.h fboverlay.h wfbrename.h
+sdk_HEADERS = fb.h fbrop.h fbpseudocolor.h fboverlay.h
endif
if MMX_CAPABLE
-libfb_la_CFLAGS = $(AM_CFLAGS) -DUSE_MMX
+AM_CFLAGS += -DUSE_MMX
libfbmmx_la_CFLAGS = \
$(DIX_CFLAGS) \
@@ -23,8 +23,6 @@ libfbmmx_la_CFLAGS = \
--param large-function-growth=10000
endif
-libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER
-
libfbmmx_la_SOURCES = \
fbmmx.c \
fbmmx.h
@@ -72,8 +70,6 @@ libfb_la_SOURCES = \
fbedge.c \
fbedgeimp.h
-libwfb_la_SOURCES = $(libfb_la_SOURCES)
-
libfb_la_LIBADD = libfbmmx.la
EXTRA_DIST = fbcmap.c
diff --git a/fb/fb.h b/fb/fb.h
index de0b3a8c2..3742cf01a 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -44,39 +44,6 @@
#include "picture.h"
#endif
-#ifdef FB_ACCESS_WRAPPER
-
-#include "wfbrename.h"
-#define FBPREFIX(x) wfb##x
-#define WRITE(ptr, val) ((*wfbWriteMemory)((ptr), (val), sizeof(*(ptr))))
-#define READ(ptr) ((*wfbReadMemory)((ptr), sizeof(*(ptr))))
-
-#define MEMCPY_WRAPPED(dst, src, size) do { \
- size_t _i; \
- CARD8 *_dst = (CARD8*)(dst), *_src = (CARD8*)(src); \
- for(_i = 0; _i < size; _i++) { \
- WRITE(_dst +_i, READ(_src + _i)); \
- } \
-} while(0)
-
-#define MEMSET_WRAPPED(dst, val, size) do { \
- size_t _i; \
- CARD8 *_dst = (CARD8*)(dst); \
- for(_i = 0; _i < size; _i++) { \
- WRITE(_dst +_i, (val)); \
- } \
-} while(0)
-
-#else
-
-#define FBPREFIX(x) fb##x
-#define WRITE(ptr, val) (*(ptr) = (val))
-#define READ(ptr) (*(ptr))
-#define MEMCPY_WRAPPED(dst, src, size) memcpy((dst), (src), (size))
-#define MEMSET_WRAPPED(dst, val, size) memset((dst), (val), (size))
-
-#endif
-
/*
* This single define controls the basic size of data manipulated
* by this software; it must be log2(sizeof (FbBits) * 8)
@@ -255,8 +222,8 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data);
#define FbPtrOffset(p,o,t) ((t *) ((CARD8 *) (p) + (o)))
#define FbSelectPatternPart(xor,o,t) ((xor) >> (FbPatternOffset (o,t) << 3))
-#define FbStorePart(dst,off,t,xor) (WRITE(FbPtrOffset(dst,off,t), \
- FbSelectPart(xor,off,t)))
+#define FbStorePart(dst,off,t,xor) (*FbPtrOffset(dst,off,t) = \
+ FbSelectPart(xor,off,t))
#ifndef FbSelectPart
#define FbSelectPart(x,o,t) FbSelectPatternPart(x,o,t)
#endif
@@ -436,7 +403,7 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data);
FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \
break; \
default: \
- WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, l)); \
+ *dst = FbDoMaskRRop(*dst, and, xor, l); \
break; \
} \
}
@@ -456,7 +423,7 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data);
break; \
FbDoRightMaskByteRRop6Cases(dst,xor) \
default: \
- WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \
+ *dst = FbDoMaskRRop (*dst, and, xor, r); \
} \
}
#endif
@@ -488,20 +455,20 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data);
* The term "lane" comes from the hardware term "byte-lane" which
*/
-#define FbLaneCase1(n,a,o) ((n) == 0x01 ? (void) \
- WRITE((CARD8 *) ((a)+FbPatternOffset(o,CARD8)), \
- fgxor) : (void) 0)
-#define FbLaneCase2(n,a,o) ((n) == 0x03 ? (void) \
- WRITE((CARD16 *) ((a)+FbPatternOffset(o,CARD16)), \
+#define FbLaneCase1(n,a,o) ((n) == 0x01 ? \
+ (*(CARD8 *) ((a)+FbPatternOffset(o,CARD8)) = \
+ fgxor) : 0)
+#define FbLaneCase2(n,a,o) ((n) == 0x03 ? \
+ (*(CARD16 *) ((a)+FbPatternOffset(o,CARD16)) = \
fgxor) : \
((void)FbLaneCase1((n)&1,a,o), \
FbLaneCase1((n)>>1,a,(o)+1)))
-#define FbLaneCase4(n,a,o) ((n) == 0x0f ? (void) \
- WRITE((CARD32 *) ((a)+FbPatternOffset(o,CARD32)), \
+#define FbLaneCase4(n,a,o) ((n) == 0x0f ? \
+ (*(CARD32 *) ((a)+FbPatternOffset(o,CARD32)) = \
fgxor) : \
((void)FbLaneCase2((n)&3,a,o), \
FbLaneCase2((n)>>2,a,(o)+2)))
-#define FbLaneCase8(n,a,o) ((n) == 0x0ff ? (void) (*(FbBits *) ((a)+(o)) = fgxor) : \
+#define FbLaneCase8(n,a,o) ((n) == 0x0ff ? (*(FbBits *) ((a)+(o)) = fgxor) : \
((void)FbLaneCase4((n)&15,a,o), \
FbLaneCase4((n)>>4,a,(o)+4)))
@@ -621,32 +588,6 @@ extern WindowPtr *WindowTable;
#define FB_SCREEN_PRIVATE
#endif
-/* Framebuffer access wrapper */
-typedef FbBits (*ReadMemoryProcPtr)(const void *src, int size);
-typedef void (*WriteMemoryProcPtr)(void *dst, FbBits value, int size);
-typedef void (*SetupWrapProcPtr)(ReadMemoryProcPtr *pRead,
- WriteMemoryProcPtr *pWrite,
- DrawablePtr pDraw);
-typedef void (*FinishWrapProcPtr)(DrawablePtr pDraw);
-
-#ifdef FB_ACCESS_WRAPPER
-
-#define fbPrepareAccess(pDraw) \
- fbGetScreenPrivate((pDraw)->pScreen)->setupWrap( \
- &wfbReadMemory, \
- &wfbWriteMemory, \
- (pDraw))
-#define fbFinishAccess(pDraw) \
- fbGetScreenPrivate((pDraw)->pScreen)->finishWrap(pDraw)
-
-#else
-
-#define fbPrepareAccess(pPix)
-#define fbFinishAccess(pDraw)
-
-#endif
-
-
#ifdef FB_SCREEN_PRIVATE
extern int fbScreenPrivateIndex;
extern int fbGetScreenPrivateIndex(void);
@@ -655,10 +596,6 @@ extern int fbGetScreenPrivateIndex(void);
typedef struct {
unsigned char win32bpp; /* window bpp for 32-bpp images */
unsigned char pix32bpp; /* pixmap bpp for 32-bpp images */
-#ifdef FB_ACCESS_WRAPPER
- SetupWrapProcPtr setupWrap; /* driver hook to set pixmap access wrapping */
- FinishWrapProcPtr finishWrap; /* driver hook to clean up pixmap access wrapping */
-#endif
} FbScreenPrivRec, *FbScreenPrivPtr;
#define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \
@@ -737,7 +674,6 @@ typedef struct {
(xoff) = __fbPixOffXPix(_pPix); \
(yoff) = __fbPixOffYPix(_pPix); \
} \
- fbPrepareAccess(pDrawable); \
(pointer) = (FbBits *) _pPix->devPrivate.ptr; \
(stride) = ((int) _pPix->devKind) / sizeof (FbBits); (void)(stride); \
(bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \
@@ -754,7 +690,6 @@ typedef struct {
(xoff) = __fbPixOffXPix(_pPix); \
(yoff) = __fbPixOffYPix(_pPix); \
} \
- fbPrepareAccess(pDrawable); \
(pointer) = (FbStip *) _pPix->devPrivate.ptr; \
(stride) = ((int) _pPix->devKind) / sizeof (FbStip); (void)(stride); \
(bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \
@@ -1804,30 +1739,6 @@ fbSetupScreen(ScreenPtr pScreen,
int bpp); /* bits per pixel of frame buffer */
Bool
-wfbFinishScreenInit(ScreenPtr pScreen,
- pointer pbits,
- int xsize,
- int ysize,
- int dpix,
- int dpiy,
- int width,
- int bpp,
- SetupWrapProcPtr setupWrap,
- FinishWrapProcPtr finishWrap);
-
-Bool
-wfbScreenInit(ScreenPtr pScreen,
- pointer pbits,
- int xsize,
- int ysize,
- int dpix,
- int dpiy,
- int width,
- int bpp,
- SetupWrapProcPtr setupWrap,
- FinishWrapProcPtr finishWrap);
-
-Bool
fbFinishScreenInit(ScreenPtr pScreen,
pointer pbits,
int xsize,
@@ -2083,11 +1994,6 @@ fbReplicatePixel (Pixel p, int bpp);
void
fbReduceRasterOp (int rop, FbBits fg, FbBits pm, FbBits *andp, FbBits *xorp);
-#ifdef FB_ACCESS_WRAPPER
-extern ReadMemoryProcPtr wfbReadMemory;
-extern WriteMemoryProcPtr wfbWriteMemory;
-#endif
-
/*
* fbwindow.c
*/
diff --git a/fb/fb24_32.c b/fb/fb24_32.c
index 00b739b25..572da4865 100644
--- a/fb/fb24_32.c
+++ b/fb/fb24_32.c
@@ -38,18 +38,18 @@
* by reading/writing aligned CARD32s where it's easy
*/
-#define Get8(a) ((CARD32) READ(a))
+#define Get8(a) ((CARD32) *(a))
#if BITMAP_BIT_ORDER == MSBFirst
#define Get24(a) ((Get8(a) << 16) | (Get8((a)+1) << 8) | Get8((a)+2))
-#define Put24(a,p) ((WRITE((a+0), (CARD8) ((p) >> 16))), \
- (WRITE((a+1), (CARD8) ((p) >> 8))), \
- (WRITE((a+2), (CARD8) (p))))
+#define Put24(a,p) (((a)[0] = (CARD8) ((p) >> 16)), \
+ ((a)[1] = (CARD8) ((p) >> 8)), \
+ ((a)[2] = (CARD8) (p)))
#else
#define Get24(a) (Get8(a) | (Get8((a)+1) << 8) | (Get8((a)+2)<<16))
-#define Put24(a,p) ((WRITE((a+0), (CARD8) (p))), \
- (WRITE((a+1), (CARD8) ((p) >> 8))), \
- (WRITE((a+2), (CARD8) ((p) >> 16))))
+#define Put24(a,p) (((a)[0] = (CARD8) (p)), \
+ ((a)[1] = (CARD8) ((p) >> 8)), \
+ ((a)[2] = (CARD8) ((p) >> 16)))
#endif
typedef void (*fb24_32BltFunc) (CARD8 *srcLine,
@@ -106,7 +106,7 @@ fb24_32BltDown (CARD8 *srcLine,
while (((long) dst & 3) && w)
{
w--;
- pixel = READ(src++);
+ pixel = *src++;
pixel = FbDoDestInvarientMergeRop(pixel);
Put24 (dst, pixel);
dst += 3;
@@ -115,35 +115,35 @@ fb24_32BltDown (CARD8 *srcLine,
while (w >= 4)
{
CARD32 s0, s1;
- s0 = READ(src++);
+ s0 = *src++;
s0 = FbDoDestInvarientMergeRop(s0);
- s1 = READ(src++);
+ s1 = *src++;
s1 = FbDoDestInvarientMergeRop(s1);
#if BITMAP_BIT_ORDER == LSBFirst
- WRITE((CARD32 *)dst, (s0 & 0xffffff) | (s1 << 24));
+ *(CARD32 *)(dst) = (s0 & 0xffffff) | (s1 << 24);
#else
- WRITE((CARD32 *)dst, (s0 << 8) | ((s1 & 0xffffff) >> 16));
+ *(CARD32 *)(dst) = (s0 << 8) | ((s1 & 0xffffff) >> 16);
#endif
- s0 = READ(src++);
+ s0 = *src++;
s0 = FbDoDestInvarientMergeRop(s0);
#if BITMAP_BIT_ORDER == LSBFirst
- WRITE((CARD32 *)(dst+4), ((s1 & 0xffffff) >> 8) | (s0 << 16));
+ *(CARD32 *)(dst+4) = ((s1 & 0xffffff) >> 8) | (s0 << 16);
#else
- WRITE((CARD32 *)(dst+4), (s1 << 16) | ((s0 & 0xffffff) >> 8));
+ *(CARD32 *)(dst+4) = (s1 << 16) | ((s0 & 0xffffff) >> 8);
#endif
- s1 = READ(src++);
+ s1 = *src++;
s1 = FbDoDestInvarientMergeRop(s1);
#if BITMAP_BIT_ORDER == LSBFirst
- WRITE((CARD32 *)(dst+8), ((s0 & 0xffffff) >> 16) | (s1 << 8));
+ *(CARD32 *)(dst+8) = ((s0 & 0xffffff) >> 16) | (s1 << 8);
#else
- WRITE((CARD32 *)(dst+8), (s0 << 24) | (s1 & 0xffffff));
+ *(CARD32 *)(dst+8) = (s0 << 24) | (s1 & 0xffffff);
#endif
dst += 12;
w -= 4;
}
while (w--)
{
- pixel = READ(src++);
+ pixel = *src++;
pixel = FbDoDestInvarientMergeRop(pixel);
Put24 (dst, pixel);
dst += 3;
@@ -153,7 +153,7 @@ fb24_32BltDown (CARD8 *srcLine,
{
while (w--)
{
- pixel = READ(src++);
+ pixel = *src++;
dpixel = Get24 (dst);
pixel = FbDoMergeRop(pixel, dpixel);
Put24 (dst, pixel);
@@ -205,40 +205,40 @@ fb24_32BltUp (CARD8 *srcLine,
w--;
pixel = Get24(src);
src += 3;
- WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
+ *dst++ = FbDoDestInvarientMergeRop(pixel);
}
/* Do four aligned pixels at a time */
while (w >= 4)
{
CARD32 s0, s1;
- s0 = READ((CARD32 *)src);
+ s0 = *(CARD32 *)(src);
#if BITMAP_BIT_ORDER == LSBFirst
pixel = s0 & 0xffffff;
#else
pixel = s0 >> 8;
#endif
- WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
- s1 = READ((CARD32 *)(src+4));
+ *dst++ = FbDoDestInvarientMergeRop(pixel);
+ s1 = *(CARD32 *)(src+4);
#if BITMAP_BIT_ORDER == LSBFirst
pixel = (s0 >> 24) | ((s1 << 8) & 0xffffff);
#else
pixel = ((s0 << 16) & 0xffffff) | (s1 >> 16);
#endif
- WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
- s0 = READ((CARD32 *)(src+8));
+ *dst++ = FbDoDestInvarientMergeRop(pixel);
+ s0 = *(CARD32 *)(src+8);
#if BITMAP_BIT_ORDER == LSBFirst
pixel = (s1 >> 16) | ((s0 << 16) & 0xffffff);
#else
pixel = ((s1 << 8) & 0xffffff) | (s0 >> 24);
#endif
- WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
+ *dst++ = FbDoDestInvarientMergeRop(pixel);
#if BITMAP_BIT_ORDER == LSBFirst
pixel = s0 >> 8;
#else
pixel = s0 & 0xffffff;
#endif
- WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
+ *dst++ = FbDoDestInvarientMergeRop(pixel);
src += 12;
w -= 4;
}
@@ -247,7 +247,7 @@ fb24_32BltUp (CARD8 *srcLine,
w--;
pixel = Get24(src);
src += 3;
- WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
+ *dst++ = FbDoDestInvarientMergeRop(pixel);
}
}
else
@@ -256,7 +256,7 @@ fb24_32BltUp (CARD8 *srcLine,
{
pixel = Get24(src);
src += 3;
- WRITE(dst, FbDoMergeRop(pixel, READ(dst)));
+ *dst = FbDoMergeRop(pixel, *dst);
dst++;
}
}
@@ -305,8 +305,6 @@ fb24_32GetSpans(DrawablePtr pDrawable,
ppt++;
pwidth++;
}
-
- fbFinishAccess (pDrawable);
}
void
@@ -368,8 +366,6 @@ fb24_32SetSpans (DrawablePtr pDrawable,
ppt++;
pwidth++;
}
-
- fbFinishAccess (pDrawable);
}
/*
@@ -433,8 +429,6 @@ fb24_32PutZImage (DrawablePtr pDrawable,
alu,
pm);
}
-
- fbFinishAccess (pDrawable);
}
void
@@ -469,8 +463,6 @@ fb24_32GetImage (DrawablePtr pDrawable,
fb24_32BltUp (src + (y + srcYoff) * srcStride, srcStride, x + srcXoff,
(CARD8 *) d, dstStride, 0,
w, h, GXcopy, pm);
-
- fbFinishAccess (pDrawable);
}
void
@@ -527,9 +519,6 @@ fb24_32CopyMtoN (DrawablePtr pSrcDrawable,
pPriv->pm);
pbox++;
}
-
- fbFinishAccess (pSrcDrawable);
- fbFinishAccess (pDstDrawable);
}
PixmapPtr
@@ -574,9 +563,6 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
GXcopy,
FB_ALLONES);
- fbFinishAccess (&pOldTile->drawable);
- fbFinishAccess (&pNewTile->drawable);
-
return pNewTile;
}
diff --git a/fb/fballpriv.c b/fb/fballpriv.c
index 4f807ed8d..3c05ff36e 100644
--- a/fb/fballpriv.c
+++ b/fb/fballpriv.c
@@ -90,8 +90,3 @@ fbAllocatePrivates(ScreenPtr pScreen, int *pGCIndex)
#endif
return TRUE;
}
-
-#ifdef FB_ACCESS_WRAPPER
-ReadMemoryProcPtr wfbReadMemory;
-WriteMemoryProcPtr wfbWriteMemory;
-#endif
diff --git a/fb/fbarc.c b/fb/fbarc.c
index d2c1a76f1..8f4d2960e 100644
--- a/fb/fbarc.c
+++ b/fb/fbarc.c
@@ -109,7 +109,6 @@ fbPolyArc (DrawablePtr pDrawable,
miPolyArc(pDrawable, pGC, 1, parcs);
parcs++;
}
- fbFinishAccess (pDrawable);
}
else
#endif
diff --git a/fb/fbbits.c b/fb/fbbits.c
index cefe943b6..56b58df4e 100644
--- a/fb/fbbits.c
+++ b/fb/fbbits.c
@@ -103,14 +103,14 @@
#define BITSUNIT BYTE
#define BITSMUL 3
-#define FbDoTypeStore(b,t,x,s) WRITE(((t *) (b)), (x) >> (s))
-#define FbDoTypeRRop(b,t,a,x,s) WRITE((t *) (b), FbDoRRop(READ((t *) (b)),\
- (a) >> (s), \
- (x) >> (s)))
-#define FbDoTypeMaskRRop(b,t,a,x,m,s) WRITE((t *) (b), FbDoMaskRRop(READ((t *) (b)),\
- (a) >> (s), \
- (x) >> (s), \
- (m) >> (s)))
+#define FbDoTypeStore(b,t,x,s) (*((t *) (b)) = (x) >> (s))
+#define FbDoTypeRRop(b,t,a,x,s) (*((t *) (b)) = FbDoRRop(*((t *) (b)),\
+ (a) >> (s), \
+ (x) >> (s)))
+#define FbDoTypeMaskRRop(b,t,a,x,m,s) (*((t *) (b)) = FbDoMaskRRop(*((t *) (b)),\
+ (a) >> (s), \
+ (x) >> (s), \
+ (m) >> (s))
#if BITMAP_BIT_ORDER == LSBFirst
#define BITSSTORE(b,x) ((unsigned long) (b) & 1 ? \
(FbDoTypeStore (b, CARD8, x, 0), \
diff --git a/fb/fbbits.h b/fb/fbbits.h
index 603c02929..e5c006dbb 100644
--- a/fb/fbbits.h
+++ b/fb/fbbits.h
@@ -42,13 +42,13 @@
#ifdef BITSSTORE
#define STORE(b,x) BITSSTORE(b,x)
#else
-#define STORE(b,x) WRITE((b), (x))
+#define STORE(b,x) (*(b) = (x))
#endif
#ifdef BITSRROP
#define RROP(b,a,x) BITSRROP(b,a,x)
#else
-#define RROP(b,a,x) WRITE((b), FbDoRRop (READ(b), (a), (x)))
+#define RROP(b,a,x) (*(b) = FbDoRRop (*(b), (a), (x)))
#endif
#ifdef BITSUNIT
@@ -119,8 +119,6 @@ BRESSOLID (DrawablePtr pDrawable,
e += e3;
}
}
-
- fbFinishAccess (pDrawable);
}
#endif
@@ -265,8 +263,6 @@ onOffOdd:
dashlen = len;
}
}
-
- fbFinishAccess (pDrawable);
}
#endif
@@ -545,18 +541,18 @@ ARC (FbBits *dst,
# define WRITE_ADDR4(n) ((n))
#endif
-#define WRITE1(d,n,fg) WRITE(d + WRITE_ADDR1(n), (BITS) (fg))
+#define WRITE1(d,n,fg) ((d)[WRITE_ADDR1(n)] = (BITS) (fg))
#ifdef BITS2
-# define WRITE2(d,n,fg) WRITE((BITS2 *) &((d)[WRITE_ADDR2(n)]), (BITS2) (fg))
+# define WRITE2(d,n,fg) (*((BITS2 *) &((d)[WRITE_ADDR2(n)])) = (BITS2) (fg))
#else
-# define WRITE2(d,n,fg) (WRITE1(d,n,fg), WRITE1(d,(n)+1,fg))
+# define WRITE2(d,n,fg) WRITE1(d,(n)+1,WRITE1(d,n,fg))
#endif
#ifdef BITS4
-# define WRITE4(d,n,fg) WRITE((BITS4 *) &((d)[WRITE_ADDR4(n)]), (BITS4) (fg))
+# define WRITE4(d,n,fg) (*((BITS4 *) &((d)[WRITE_ADDR4(n)])) = (BITS4) (fg))
#else
-# define WRITE4(d,n,fg) (WRITE2(d,n,fg), WRITE2(d,(n)+2,fg))
+# define WRITE4(d,n,fg) WRITE2(d,(n)+2,WRITE2(d,n,fg))
#endif
void
@@ -714,10 +710,8 @@ POLYLINE (DrawablePtr pDrawable,
intToX(pt2) + xoff, intToY(pt2) + yoff,
npt == 0 && pGC->capStyle != CapNotLast,
&dashoffset);
- if (!npt) {
- fbFinishAccess (pDrawable);
+ if (!npt)
return;
- }
pt1 = pt2;
pt2 = *pts++;
npt--;
@@ -782,7 +776,6 @@ POLYLINE (DrawablePtr pDrawable,
{
RROP(bits,and,xor);
}
- fbFinishAccess (pDrawable);
return;
}
pt1 = pt2;
@@ -793,8 +786,6 @@ POLYLINE (DrawablePtr pDrawable,
}
}
}
-
- fbFinishAccess (pDrawable);
}
#endif
@@ -892,20 +883,20 @@ POLYSEGMENT (DrawablePtr pDrawable,
FbMaskBits (dstX, width, startmask, nmiddle, endmask);
if (startmask)
{
- WRITE(dstLine, FbDoMaskRRop (READ(dstLine), andBits, xorBits, startmask));
+ *dstLine = FbDoMaskRRop (*dstLine, andBits, xorBits, startmask);
dstLine++;
}
if (!andBits)
while (nmiddle--)
- WRITE(dstLine++, xorBits);
+ *dstLine++ = xorBits;
else
while (nmiddle--)
{
- WRITE(dstLine, FbDoRRop (READ(dstLine), andBits, xorBits));
+ *dstLine = FbDoRRop (*dstLine, andBits, xorBits);
dstLine++;
}
if (endmask)
- WRITE(dstLine, FbDoMaskRRop (READ(dstLine), andBits, xorBits, endmask));
+ *dstLine = FbDoMaskRRop (*dstLine, andBits, xorBits, endmask);
}
else
{
@@ -959,8 +950,6 @@ POLYSEGMENT (DrawablePtr pDrawable,
}
}
}
-
- fbFinishAccess (pDrawable);
}
#endif
diff --git a/fb/fbblt.c b/fb/fbblt.c
index e18981a83..d176a7c27 100644
--- a/fb/fbblt.c
+++ b/fb/fbblt.c
@@ -92,10 +92,10 @@ fbBlt (FbBits *srcLine,
if (!upsidedown)
for (i = 0; i < height; i++)
- MEMCPY_WRAPPED(dst + i * dstStride, src + i * srcStride, width);
+ memcpy(dst + i * dstStride, src + i * srcStride, width);
else
for (i = height - 1; i >= 0; i--)
- MEMCPY_WRAPPED(dst + i * dstStride, src + i * srcStride, width);
+ memcpy(dst + i * dstStride, src + i * srcStride, width);
return;
}
@@ -137,7 +137,7 @@ fbBlt (FbBits *srcLine,
{
if (endmask)
{
- bits = READ(--src);
+ bits = *--src;
--dst;
FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask);
}
@@ -145,20 +145,20 @@ fbBlt (FbBits *srcLine,
if (destInvarient)
{
while (n--)
- WRITE(--dst, FbDoDestInvarientMergeRop(READ(--src)));
+ *--dst = FbDoDestInvarientMergeRop(*--src);
}
else
{
while (n--)
{
- bits = READ(--src);
+ bits = *--src;
--dst;
- WRITE(dst, FbDoMergeRop (bits, READ(dst)));
+ *dst = FbDoMergeRop (bits, *dst);
}
}
if (startmask)
{
- bits = READ(--src);
+ bits = *--src;
--dst;
FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask);
}
@@ -167,7 +167,7 @@ fbBlt (FbBits *srcLine,
{
if (startmask)
{
- bits = READ(src++);
+ bits = *src++;
FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask);
dst++;
}
@@ -198,20 +198,20 @@ fbBlt (FbBits *srcLine,
}
#endif
while (n--)
- WRITE(dst++, FbDoDestInvarientMergeRop(READ(src++)));
+ *dst++ = FbDoDestInvarientMergeRop(*src++);
}
else
{
while (n--)
{
- bits = READ(src++);
- WRITE(dst, FbDoMergeRop (bits, READ(dst)));
+ bits = *src++;
+ *dst = FbDoMergeRop (bits, *dst);
dst++;
}
}
if (endmask)
{
- bits = READ(src);
+ bits = *src;
FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask);
}
}
@@ -240,13 +240,13 @@ fbBlt (FbBits *srcLine,
if (reverse)
{
if (srcX < dstX)
- bits1 = READ(--src);
+ bits1 = *--src;
if (endmask)
{
bits = FbScrRight(bits1, rightShift);
if (FbScrRight(endmask, leftShift))
{
- bits1 = READ(--src);
+ bits1 = *--src;
bits |= FbScrLeft(bits1, leftShift);
}
--dst;
@@ -258,10 +258,10 @@ fbBlt (FbBits *srcLine,
while (n--)
{
bits = FbScrRight(bits1, rightShift);
- bits1 = READ(--src);
+ bits1 = *--src;
bits |= FbScrLeft(bits1, leftShift);
--dst;
- WRITE(dst, FbDoDestInvarientMergeRop(bits));
+ *dst = FbDoDestInvarientMergeRop(bits);
}
}
else
@@ -269,10 +269,10 @@ fbBlt (FbBits *srcLine,
while (n--)
{
bits = FbScrRight(bits1, rightShift);
- bits1 = READ(--src);
+ bits1 = *--src;
bits |= FbScrLeft(bits1, leftShift);
--dst;
- WRITE(dst, FbDoMergeRop(bits, READ(dst)));
+ *dst = FbDoMergeRop(bits, *dst);
}
}
if (startmask)
@@ -280,7 +280,7 @@ fbBlt (FbBits *srcLine,
bits = FbScrRight(bits1, rightShift);
if (FbScrRight(startmask, leftShift))
{
- bits1 = READ(--src);
+ bits1 = *--src;
bits |= FbScrLeft(bits1, leftShift);
}
--dst;
@@ -290,13 +290,13 @@ fbBlt (FbBits *srcLine,
else
{
if (srcX > dstX)
- bits1 = READ(src++);
+ bits1 = *src++;
if (startmask)
{
bits = FbScrLeft(bits1, leftShift);
if (FbScrLeft(startmask, rightShift))
{
- bits1 = READ(src++);
+ bits1 = *src++;
bits |= FbScrRight(bits1, rightShift);
}
FbDoLeftMaskByteMergeRop (dst, bits, startbyte, startmask);
@@ -308,9 +308,9 @@ fbBlt (FbBits *srcLine,
while (n--)
{
bits = FbScrLeft(bits1, leftShift);
- bits1 = READ(src++);
+ bits1 = *src++;
bits |= FbScrRight(bits1, rightShift);
- WRITE(dst, FbDoDestInvarientMergeRop(bits));
+ *dst = FbDoDestInvarientMergeRop(bits);
dst++;
}
}
@@ -319,9 +319,9 @@ fbBlt (FbBits *srcLine,
while (n--)
{
bits = FbScrLeft(bits1, leftShift);
- bits1 = READ(src++);
+ bits1 = *src++;
bits |= FbScrRight(bits1, rightShift);
- WRITE(dst, FbDoMergeRop(bits, READ(dst)));
+ *dst = FbDoMergeRop(bits, *dst);
dst++;
}
}
@@ -330,7 +330,7 @@ fbBlt (FbBits *srcLine,
bits = FbScrLeft(bits1, leftShift);
if (FbScrLeft(endmask, rightShift))
{
- bits1 = READ(src);
+ bits1 = *src;
bits |= FbScrRight(bits1, rightShift);
}
FbDoRightMaskByteMergeRop (dst, bits, endbyte, endmask);
@@ -425,45 +425,45 @@ fbBlt24Line (FbBits *src,
{
if (endmask)
{
- bits = READ(--src);
+ bits = *--src;
--dst;
- WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask));
+ *dst = FbDoMaskMergeRop (bits, *dst, mask & endmask);
mask = FbPrev24Pix (mask);
}
while (n--)
{
- bits = READ(--src);
+ bits = *--src;
--dst;
- WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask));
+ *dst = FbDoMaskMergeRop (bits, *dst, mask);
mask = FbPrev24Pix (mask);
}
if (startmask)
{
- bits = READ(--src);
+ bits = *--src;
--dst;
- WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & startmask));
+ *dst = FbDoMaskMergeRop(bits, *dst, mask & startmask);
}
}
else
{
if (startmask)
{
- bits = READ(src++);
- WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask));
+ bits = *src++;
+ *dst = FbDoMaskMergeRop (bits, *dst, mask & startmask);
dst++;
mask = FbNext24Pix(mask);
}
while (n--)
{
- bits = READ(src++);
- WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask));
+ bits = *src++;
+ *dst = FbDoMaskMergeRop (bits, *dst, mask);
dst++;
mask = FbNext24Pix(mask);
}
if (endmask)
{
- bits = READ(src);
- WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & endmask));
+ bits = *src;
+ *dst = FbDoMaskMergeRop(bits, *dst, mask & endmask);
}
}
}
@@ -484,26 +484,26 @@ fbBlt24Line (FbBits *src,
if (reverse)
{
if (srcX < dstX)
- bits1 = READ(--src);
+ bits1 = *--src;
if (endmask)
{
bits = FbScrRight(bits1, rightShift);
if (FbScrRight(endmask, leftShift))
{
- bits1 = READ(--src);
+ bits1 = *--src;
bits |= FbScrLeft(bits1, leftShift);
}
--dst;
- WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask));
+ *dst = FbDoMaskMergeRop (bits, *dst, mask & endmask);
mask = FbPrev24Pix(mask);
}
while (n--)
{
bits = FbScrRight(bits1, rightShift);
- bits1 = READ(--src);
+ bits1 = *--src;
bits |= FbScrLeft(bits1, leftShift);
--dst;
- WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask));
+ *dst = FbDoMaskMergeRop(bits, *dst, mask);
mask = FbPrev24Pix(mask);
}
if (startmask)
@@ -511,32 +511,32 @@ fbBlt24Line (FbBits *src,
bits = FbScrRight(bits1, rightShift);
if (FbScrRight(startmask, leftShift))
{
- bits1 = READ(--src);
+ bits1 = *--src;
bits |= FbScrLeft(bits1, leftShift);
}
--dst;
- WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask));
+ *dst = FbDoMaskMergeRop (bits, *dst, mask & startmask);
}
}
else
{
if (srcX > dstX)
- bits1 = READ(src++);
+ bits1 = *src++;
if (startmask)
{
bits = FbScrLeft(bits1, leftShift);
- bits1 = READ(src++);
+ bits1 = *src++;
bits |= FbScrRight(bits1, rightShift);
- WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask));
+ *dst = FbDoMaskMergeRop (bits, *dst, mask & startmask);
dst++;
mask = FbNext24Pix(mask);
}
while (n--)
{
bits = FbScrLeft(bits1, leftShift);
- bits1 = READ(src++);
+ bits1 = *src++;
bits |= FbScrRight(bits1, rightShift);
- WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask));
+ *dst = FbDoMaskMergeRop(bits, *dst, mask);
dst++;
mask = FbNext24Pix(mask);
}
@@ -545,10 +545,10 @@ fbBlt24Line (FbBits *src,
bits = FbScrLeft(bits1, leftShift);
if (FbScrLeft(endmask, rightShift))
{
- bits1 = READ(src);
+ bits1 = *src;
bits |= FbScrRight(bits1, rightShift);
}
- WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask));
+ *dst = FbDoMaskMergeRop (bits, *dst, mask & endmask);
}
}
}
@@ -707,8 +707,8 @@ fbBltOdd (FbBits *srcLine,
{
if (startmask)
{
- bits = READ(src++);
- WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), startmask));
+ bits = *src++;
+ *dst = FbDoMaskMergeRop (bits, *dst, startmask);
dst++;
}
n = nmiddle;
@@ -716,8 +716,8 @@ fbBltOdd (FbBits *srcLine,
{
while (n--)
{
- bits = READ(src++);
- WRITE(dst, FbDoDestInvarientMergeRop(bits));
+ bits = *src++;
+ *dst = FbDoDestInvarientMergeRop(bits);
dst++;
}
}
@@ -725,28 +725,28 @@ fbBltOdd (FbBits *srcLine,
{
while (n--)
{
- bits = READ(src++);
- WRITE(dst, FbDoMergeRop (bits, READ(dst)));
+ bits = *src++;
+ *dst = FbDoMergeRop (bits, *dst);
dst++;
}
}
if (endmask)
{
- bits = READ(src);
- WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), endmask));
+ bits = *src;
+ *dst = FbDoMaskMergeRop(bits, *dst, endmask);
}
}
else
{
bits = 0;
if (srcX > dstX)
- bits = READ(src++);
+ bits = *src++;
if (startmask)
{
bits1 = FbScrLeft(bits, leftShift);
- bits = READ(src++);
+ bits = *src++;
bits1 |= FbScrRight(bits, rightShift);
- WRITE(dst, FbDoMaskMergeRop (bits1, READ(dst), startmask));
+ *dst = FbDoMaskMergeRop (bits1, *dst, startmask);
dst++;
}
n = nmiddle;
@@ -755,9 +755,9 @@ fbBltOdd (FbBits *srcLine,
while (n--)
{
bits1 = FbScrLeft(bits, leftShift);
- bits = READ(src++);
+ bits = *src++;
bits1 |= FbScrRight(bits, rightShift);
- WRITE(dst, FbDoDestInvarientMergeRop(bits1));
+ *dst = FbDoDestInvarientMergeRop(bits1);
dst++;
}
}
@@ -766,9 +766,9 @@ fbBltOdd (FbBits *srcLine,
while (n--)
{
bits1 = FbScrLeft(bits, leftShift);
- bits = READ(src++);
+ bits = *src++;
bits1 |= FbScrRight(bits, rightShift);
- WRITE(dst, FbDoMergeRop(bits1, READ(dst)));
+ *dst = FbDoMergeRop(bits1, *dst);
dst++;
}
}
@@ -777,10 +777,10 @@ fbBltOdd (FbBits *srcLine,
bits1 = FbScrLeft(bits, leftShift);
if (FbScrLeft(endmask, rightShift))
{
- bits = READ(src);
+ bits = *src;
bits1 |= FbScrRight(bits, rightShift);
}
- WRITE(dst, FbDoMaskMergeRop (bits1, READ(dst), endmask));
+ *dst = FbDoMaskMergeRop (bits1, *dst, endmask);
}
}
}
diff --git a/fb/fbbltone.c b/fb/fbbltone.c
index d2c180fef..f06357a37 100644
--- a/fb/fbbltone.c
+++ b/fb/fbbltone.c
@@ -51,12 +51,12 @@
#define LoadBits {\
if (leftShift) { \
- bitsRight = (src < srcEnd ? READ(src++) : 0); \
+ bitsRight = (src < srcEnd ? *src++ : 0); \
bits = (FbStipLeft (bitsLeft, leftShift) | \
FbStipRight(bitsRight, rightShift)); \
bitsLeft = bitsRight; \
} else \
- bits = (src < srcEnd ? READ(src++) : 0); \
+ bits = (src < srcEnd ? *src++ : 0); \
}
#ifndef FBNOPIXADDR
@@ -285,7 +285,7 @@ fbBltOne (FbStip *src,
bitsLeft = 0;
if (srcX > dstS)
- bitsLeft = READ(src++);
+ bitsLeft = *src++;
if (n)
{
/*
@@ -338,7 +338,7 @@ fbBltOne (FbStip *src,
else
#endif
mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)];
- WRITE(dst, FbOpaqueStipple (mask, fgxor, bgxor));
+ *dst = FbOpaqueStipple (mask, fgxor, bgxor);
dst++;
bits = FbStipLeft(bits, pixelsPerDst);
}
@@ -368,8 +368,8 @@ fbBltOne (FbStip *src,
if (left || !transparent)
{
mask = fbBits[left];
- WRITE(dst, FbStippleRRop (READ(dst), mask,
- fgand, fgxor, bgand, bgxor));
+ *dst = FbStippleRRop (*dst, mask,
+ fgand, fgxor, bgand, bgxor);
}
dst++;
bits = FbStipLeft(bits, pixelsPerDst);
@@ -537,7 +537,7 @@ const FbBits fbStipple24Bits[3][1 << FbStip24Len] = {
stip = FbLeftStipBits(bits, len); \
} else { \
stip = FbLeftStipBits(bits, remain); \
- bits = (src < srcEnd ? READ(src++) : 0); \
+ bits = (src < srcEnd ? *src++ : 0); \
__len = (len) - remain; \
stip = FbMergePartStip24Bits(stip, FbLeftStipBits(bits, __len), \
remain, __len); \
@@ -548,7 +548,7 @@ const FbBits fbStipple24Bits[3][1 << FbStip24Len] = {
}
#define fbInitStipBits(offset,len,stip) {\
- bits = FbStipLeft (READ(src++),offset); \
+ bits = FbStipLeft (*src++,offset); \
remain = FB_STIP_UNIT - offset; \
fbFirstStipBits(len,stip); \
stip = FbMergeStip24Bits (0, stip, len); \
@@ -631,11 +631,10 @@ fbBltOne24 (FbStip *srcLine,
if (leftMask)
{
mask = fbStipple24Bits[rot >> 3][stip];
- WRITE(dst, (READ(dst) & ~leftMask) |
- (FbOpaqueStipple (mask,
- FbRot24(fgxor, rot),
- FbRot24(bgxor, rot))
- & leftMask));
+ *dst = (*dst & ~leftMask) | (FbOpaqueStipple (mask,
+ FbRot24(fgxor, rot),
+ FbRot24(bgxor, rot))
+ & leftMask);
dst++;
fbNextStipBits(rot,stip);
}
@@ -643,20 +642,19 @@ fbBltOne24 (FbStip *srcLine,
while (nl--)
{
mask = fbStipple24Bits[rot>>3][stip];
- WRITE(dst, FbOpaqueStipple (mask,
- FbRot24(fgxor, rot),
- FbRot24(bgxor, rot)));
+ *dst = FbOpaqueStipple (mask,
+ FbRot24(fgxor, rot),
+ FbRot24(bgxor, rot));
dst++;
fbNextStipBits(rot,stip);
}
if (rightMask)
{
mask = fbStipple24Bits[rot >> 3][stip];
- WRITE(dst, (READ(dst) & ~rightMask) |
- (FbOpaqueStipple (mask,
- FbRot24(fgxor, rot),
- FbRot24(bgxor, rot))
- & rightMask));
+ *dst = (*dst & ~rightMask) | (FbOpaqueStipple (mask,
+ FbRot24(fgxor, rot),
+ FbRot24(bgxor, rot))
+ & rightMask);
}
dst += dstStride;
src += srcStride;
@@ -676,7 +674,7 @@ fbBltOne24 (FbStip *srcLine,
if (stip)
{
mask = fbStipple24Bits[rot >> 3][stip] & leftMask;
- WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask));
+ *dst = (*dst & ~mask) | (FbRot24(fgxor, rot) & mask);
}
dst++;
fbNextStipBits (rot, stip);
@@ -687,7 +685,7 @@ fbBltOne24 (FbStip *srcLine,
if (stip)
{
mask = fbStipple24Bits[rot>>3][stip];
- WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor,rot) & mask));
+ *dst = (*dst & ~mask) | (FbRot24(fgxor,rot) & mask);
}
dst++;
fbNextStipBits (rot, stip);
@@ -697,7 +695,7 @@ fbBltOne24 (FbStip *srcLine,
if (stip)
{
mask = fbStipple24Bits[rot >> 3][stip] & rightMask;
- WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask));
+ *dst = (*dst & ~mask) | (FbRot24(fgxor, rot) & mask);
}
}
dst += dstStride;
@@ -714,12 +712,12 @@ fbBltOne24 (FbStip *srcLine,
if (leftMask)
{
mask = fbStipple24Bits[rot >> 3][stip];
- WRITE(dst, FbStippleRRopMask (READ(dst), mask,
- FbRot24(fgand, rot),
- FbRot24(fgxor, rot),
- FbRot24(bgand, rot),
- FbRot24(bgxor, rot),
- leftMask));
+ *dst = FbStippleRRopMask (*dst, mask,
+ FbRot24(fgand, rot),
+ FbRot24(fgxor, rot),
+ FbRot24(bgand, rot),
+ FbRot24(bgxor, rot),
+ leftMask);
dst++;
fbNextStipBits(rot,stip);
}
@@ -727,23 +725,23 @@ fbBltOne24 (FbStip *srcLine,
while (nl--)
{
mask = fbStipple24Bits[rot >> 3][stip];
- WRITE(dst, FbStippleRRop (READ(dst), mask,
- FbRot24(fgand, rot),
- FbRot24(fgxor, rot),
- FbRot24(bgand, rot),
- FbRot24(bgxor, rot)));
+ *dst = FbStippleRRop (*dst, mask,
+ FbRot24(fgand, rot),
+ FbRot24(fgxor, rot),
+ FbRot24(bgand, rot),
+ FbRot24(bgxor, rot));
dst++;
fbNextStipBits(rot,stip);
}
if (rightMask)
{
mask = fbStipple24Bits[rot >> 3][stip];
- WRITE(dst, FbStippleRRopMask (READ(dst), mask,
- FbRot24(fgand, rot),
- FbRot24(fgxor, rot),
- FbRot24(bgand, rot),
- FbRot24(bgxor, rot),
- rightMask));
+ *dst = FbStippleRRopMask (*dst, mask,
+ FbRot24(fgand, rot),
+ FbRot24(fgxor, rot),
+ FbRot24(bgand, rot),
+ FbRot24(bgxor, rot),
+ rightMask);
}
dst += dstStride;
}
@@ -834,7 +832,7 @@ fbBltPlane (FbBits *src,
if (srcBpp == 24)
srcMask0 = FbRot24(pm,rot0) & FbBitsMask(0, srcBpp);
#endif
- srcBits = READ(s++);
+ srcBits = *s++;
dstMask = dstMaskFirst;
dstUnion = 0;
@@ -846,7 +844,7 @@ fbBltPlane (FbBits *src,
{
if (!srcMask)
{
- srcBits = READ(s++);
+ srcBits = *s++;
#ifdef FB_24BIT
if (srcBpp == 24)
srcMask0 = FbNext24Pix(srcMask0) & FbBitsMask(0,24);
@@ -855,9 +853,9 @@ fbBltPlane (FbBits *src,
}
if (!dstMask)
{
- WRITE(d, FbStippleRRopMask(READ(d), dstBits,
- fgand, fgxor, bgand, bgxor,
- dstUnion));
+ *d = FbStippleRRopMask(*d, dstBits,
+ fgand, fgxor, bgand, bgxor,
+ dstUnion);
d++;
dstMask = FbStipMask(0,1);
dstUnion = 0;
@@ -873,9 +871,9 @@ fbBltPlane (FbBits *src,
dstMask = FbStipRight(dstMask,1);
}
if (dstUnion)
- WRITE(d, FbStippleRRopMask(READ(d),dstBits,
- fgand, fgxor, bgand, bgxor,
- dstUnion));
+ *d = FbStippleRRopMask(*d,dstBits,
+ fgand, fgxor, bgand, bgxor,
+ dstUnion);
}
}
diff --git a/fb/fbcompose.c b/fb/fbcompose.c
index 6ea948307..b1903e90b 100644
--- a/fb/fbcompose.c
+++ b/fb/fbcompose.c
@@ -53,7 +53,7 @@ typedef FASTCALL void (*fetchProc)(const FbBits *bits, int x, int width, CARD32
static FASTCALL void
fbFetch_a8r8g8b8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
{
- MEMCPY_WRAPPED(buffer, (const CARD32 *)bits + x, width*sizeof(CARD32));
+ memcpy(buffer, (const CARD32 *)bits + x, width*sizeof(CARD32));
}
static FASTCALL void
@@ -62,7 +62,7 @@ fbFetch_x8r8g8b8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
const CARD32 *pixel = (const CARD32 *)bits + x;
const CARD32 *end = pixel + width;
while (pixel < end) {
- WRITE(buffer++, READ(pixel++) | 0xff000000);
+ *buffer++ = *pixel++ | 0xff000000;
}
}
@@ -72,9 +72,9 @@ fbFetch_a8b8g8r8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
const CARD32 *pixel = (CARD32 *)bits + x;
const CARD32 *end = pixel + width;
while (pixel < end) {
- WRITE(buffer++, ((READ(pixel) & 0xff00ff00) |
- ((READ(pixel) >> 16) & 0xff) |
- ((READ(pixel) & 0xff) << 16)));
+ *buffer++ = ((*pixel & 0xff00ff00) |
+ ((*pixel >> 16) & 0xff) |
+ ((*pixel & 0xff) << 16));
++pixel;
}
}
@@ -85,10 +85,10 @@ fbFetch_x8b8g8r8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
const CARD32 *pixel = (CARD32 *)bits + x;
const CARD32 *end = pixel + width;
while (pixel < end) {
- WRITE(buffer++, 0xff000000 |
- ((READ(pixel) & 0x0000ff00) |
- ((READ(pixel) >> 16) & 0xff) |
- ((READ(pixel) & 0xff) << 16)));
+ *buffer++ = 0xff000000 |
+ ((*pixel & 0x0000ff00) |
+ ((*pixel >> 16) & 0xff) |
+ ((*pixel & 0xff) << 16));
++pixel;
}
}
@@ -101,7 +101,7 @@ fbFetch_r8g8b8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP
while (pixel < end) {
CARD32 b = Fetch24(pixel) | 0xff000000;
pixel += 3;
- WRITE(buffer++, b);
+ *buffer++ = b;
}
}
@@ -113,13 +113,13 @@ fbFetch_b8g8r8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP
while (pixel < end) {
CARD32 b = 0xff000000;
#if IMAGE_BYTE_ORDER == MSBFirst
- b |= (READ(pixel++));
- b |= (READ(pixel++) << 8);
- b |= (READ(pixel++) << 16);
+ b |= (*pixel++);
+ b |= (*pixel++ << 8);
+ b |= (*pixel++ << 16);
#else
- b |= (READ(pixel++) << 16);
- b |= (READ(pixel++) << 8);
- b |= (READ(pixel++));
+ b |= (*pixel++ << 16);
+ b |= (*pixel++ << 8);
+ b |= (*pixel++);
#endif
}
}
@@ -130,13 +130,13 @@ fbFetch_r5g6b5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP
const CARD16 *pixel = (const CARD16 *)bits + x;
const CARD16 *end = pixel + width;
while (pixel < end) {
- CARD32 p = READ(pixel++);
+ CARD32 p = *pixel++;
CARD32 r = (((p) << 3) & 0xf8) |
(((p) << 5) & 0xfc00) |
(((p) << 8) & 0xf80000);
r |= (r >> 5) & 0x70007;
r |= (r >> 6) & 0x300;
- WRITE(buffer++, 0xff000000 | r);
+ *buffer++ = 0xff000000 | r;
}
}
@@ -146,13 +146,13 @@ fbFetch_b5g6r5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP
const CARD16 *pixel = (const CARD16 *)bits + x;
const CARD16 *end = pixel + width;
while (pixel < end) {
- CARD32 p = READ(pixel++);
+ CARD32 p = *pixel++;
CARD32 r,g,b;
b = ((p & 0xf800) | ((p & 0xe000) >> 5)) >> 8;
g = ((p & 0x07e0) | ((p & 0x0600) >> 6)) << 5;
r = ((p & 0x001c) | ((p & 0x001f) << 5)) << 14;
- WRITE(buffer++, (0xff000000 | r | g | b));
+ *buffer++ = (0xff000000 | r | g | b);
}
}
@@ -162,14 +162,14 @@ fbFetch_a1r5g5b5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
const CARD16 *pixel = (const CARD16 *)bits + x;
const CARD16 *end = pixel + width;
while (pixel < end) {
- CARD32 p = READ(pixel++);
+ CARD32 p = *pixel++;
CARD32 r,g,b, a;
a = (CARD32) ((CARD8) (0 - ((p & 0x8000) >> 15))) << 24;
r = ((p & 0x7c00) | ((p & 0x7000) >> 5)) << 9;
g = ((p & 0x03e0) | ((p & 0x0380) >> 5)) << 6;
b = ((p & 0x001c) | ((p & 0x001f) << 5)) >> 2;
- WRITE(buffer++, (a | r | g | b));
+ *buffer++ = (a | r | g | b);
}
}
@@ -179,13 +179,13 @@ fbFetch_x1r5g5b5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
const CARD16 *pixel = (const CARD16 *)bits + x;
const CARD16 *end = pixel + width;
while (pixel < end) {
- CARD32 p = READ(pixel++);
+ CARD32 p = *pixel++;
CARD32 r,g,b;
r = ((p & 0x7c00) | ((p & 0x7000) >> 5)) << 9;
g = ((p & 0x03e0) | ((p & 0x0380) >> 5)) << 6;
b = ((p & 0x001c) | ((p & 0x001f) << 5)) >> 2;
- WRITE(buffer++, (0xff000000 | r | g | b));
+ *buffer++ = (0xff000000 | r | g | b);
}
}
@@ -195,14 +195,14 @@ fbFetch_a1b5g5r5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
const CARD16 *pixel = (const CARD16 *)bits + x;
const CARD16 *end = pixel + width;
while (pixel < end) {
- CARD32 p = READ(pixel++);
+ CARD32 p = *pixel++;
CARD32 r,g,b, a;
a = (CARD32) ((CARD8) (0 - ((p & 0x8000) >> 15))) << 24;
b = ((p & 0x7c00) | ((p & 0x7000) >> 5)) >> 7;
g = ((p & 0x03e0) | ((p & 0x0380) >> 5)) << 6;
r = ((p & 0x001c) | ((p & 0x001f) << 5)) << 14;
- WRITE(buffer++, (a | r | g | b));
+ *buffer++ = (a | r | g | b);
}
}
@@ -212,13 +212,13 @@ fbFetch_x1b5g5r5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
const CARD16 *pixel = (const CARD16 *)bits + x;
const CARD16 *end = pixel + width;
while (pixel < end) {
- CARD32 p = READ(pixel++);
+ CARD32 p = *pixel++;
CARD32 r,g,b;
b = ((p & 0x7c00) | ((p & 0x7000) >> 5)) >> 7;
g = ((p & 0x03e0) | ((p & 0x0380) >> 5)) << 6;
r = ((p & 0x001c) | ((p & 0x001f) << 5)) << 14;
- WRITE(buffer++, (0xff000000 | r | g | b));
+ *buffer++ = (0xff000000 | r | g | b);
}
}
@@ -228,14 +228,14 @@ fbFetch_a4r4g4b4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
const CARD16 *pixel = (const CARD16 *)bits + x;
const CARD16 *end = pixel + width;
while (pixel < end) {
- CARD32 p = READ(pixel++);
+ CARD32 p = *pixel++;
CARD32 r,g,b, a;
a = ((p & 0xf000) | ((p & 0xf000) >> 4)) << 16;
r = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) << 12;
g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8;
b = ((p & 0x000f) | ((p & 0x000f) << 4));
- WRITE(buffer++, (a | r | g | b));
+ *buffer++ = (a | r | g | b);
}
}
@@ -245,13 +245,13 @@ fbFetch_x4r4g4b4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
const CARD16 *pixel = (const CARD16 *)bits + x;
const CARD16 *end = pixel + width;
while (pixel < end) {
- CARD32 p = READ(pixel++);
+ CARD32 p = *pixel++;
CARD32 r,g,b;
r = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) << 12;
g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8;
b = ((p & 0x000f) | ((p & 0x000f) << 4));
- WRITE(buffer++, (0xff000000 | r | g | b));
+ *buffer++ = (0xff000000 | r | g | b);
}
}
@@ -261,14 +261,14 @@ fbFetch_a4b4g4r4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
const CARD16 *pixel = (const CARD16 *)bits + x;
const CARD16 *end = pixel + width;
while (pixel < end) {
- CARD32 p = READ(pixel++);
+ CARD32 p = *pixel++;
CARD32 r,g,b, a;
a = ((p & 0xf000) | ((p & 0xf000) >> 4)) << 16;
b = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) >> 4;
g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8;
r = ((p & 0x000f) | ((p & 0x000f) << 4)) << 16;
- WRITE(buffer++, (a | r | g | b));
+ *buffer++ = (a | r | g | b);
}
}
@@ -278,13 +278,13 @@ fbFetch_x4b4g4r4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
const CARD16 *pixel = (const CARD16 *)bits + x;
const CARD16 *end = pixel + width;
while (pixel < end) {
- CARD32 p = READ(pixel++);
+ CARD32 p = *pixel++;
CARD32 r,g,b;
b = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) >> 4;
g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8;
r = ((p & 0x000f) | ((p & 0x000f) << 4)) << 16;
- WRITE(buffer++, (0xff000000 | r | g | b));
+ *buffer++ = (0xff000000 | r | g | b);
}
}
@@ -294,7 +294,7 @@ fbFetch_a8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr i
const CARD8 *pixel = (const CARD8 *)bits + x;
const CARD8 *end = pixel + width;
while (pixel < end) {
- WRITE(buffer++, READ(pixel++) << 24);
+ *buffer++ = (*pixel++) << 24;
}
}
@@ -304,7 +304,7 @@ fbFetch_r3g3b2 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP
const CARD8 *pixel = (const CARD8 *)bits + x;
const CARD8 *end = pixel + width;
while (pixel < end) {
- CARD32 p = READ(pixel++);
+ CARD32 p = *pixel++;
CARD32 r,g,b;
r = ((p & 0xe0) | ((p & 0xe0) >> 3) | ((p & 0xc0) >> 6)) << 16;
@@ -313,7 +313,7 @@ fbFetch_r3g3b2 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP
((p & 0x03) << 2) |
((p & 0x03) << 4) |
((p & 0x03) << 6));
- WRITE(buffer++, (0xff000000 | r | g | b));
+ *buffer++ = (0xff000000 | r | g | b);
}
}
@@ -323,7 +323,7 @@ fbFetch_b2g3r3 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP
const CARD8 *pixel = (const CARD8 *)bits + x;
const CARD8 *end = pixel + width;
while (pixel < end) {
- CARD32 p = READ(pixel++);
+ CARD32 p = *pixel++;
CARD32 r,g,b;
b = (((p & 0xc0) ) |
@@ -334,7 +334,7 @@ fbFetch_b2g3r3 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP
r = (((p & 0x07) ) |
((p & 0x07) << 3) |
((p & 0x06) << 6)) << 16;
- WRITE(buffer++, (0xff000000 | r | g | b));
+ *buffer++ = (0xff000000 | r | g | b);
}
}
@@ -344,14 +344,14 @@ fbFetch_a2r2g2b2 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
const CARD8 *pixel = (const CARD8 *)bits + x;
const CARD8 *end = pixel + width;
while (pixel < end) {
- CARD32 p = READ(pixel++);
+ CARD32 p = *pixel++;
CARD32 a,r,g,b;
a = ((p & 0xc0) * 0x55) << 18;
r = ((p & 0x30) * 0x55) << 12;
g = ((p & 0x0c) * 0x55) << 6;
b = ((p & 0x03) * 0x55);
- WRITE(buffer++, a|r|g|b);
+ *buffer++ = a|r|g|b;
}
}
@@ -361,14 +361,14 @@ fbFetch_a2b2g2r2 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
const CARD8 *pixel = (const CARD8 *)bits + x;
const CARD8 *end = pixel + width;
while (pixel < end) {
- CARD32 p = READ(pixel++);
+ CARD32 p = *pixel++;
CARD32 a,r,g,b;
a = ((p & 0xc0) * 0x55) << 18;
b = ((p & 0x30) * 0x55) >> 6;
g = ((p & 0x0c) * 0x55) << 6;
r = ((p & 0x03) * 0x55) << 16;
- WRITE(buffer++, a|r|g|b);
+ *buffer++ = a|r|g|b;
}
}
@@ -378,8 +378,8 @@ fbFetch_c8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr i
const CARD8 *pixel = (const CARD8 *)bits + x;
const CARD8 *end = pixel + width;
while (pixel < end) {
- CARD32 p = READ(pixel++);
- WRITE(buffer++, indexed->rgba[p]);
+ CARD32 p = *pixel++;
+ *buffer++ = indexed->rgba[p];
}
}
@@ -389,8 +389,8 @@ fbFetch_x4a4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr
const CARD8 *pixel = (const CARD8 *)bits + x;
const CARD8 *end = pixel + width;
while (pixel < end) {
- CARD8 p = READ(pixel++) & 0xf;
- WRITE(buffer++, (p | (p << 4)) << 24);
+ CARD8 p = (*pixel++) & 0xf;
+ *buffer++ = (p | (p << 4)) << 24;
}
}
@@ -409,7 +409,7 @@ fbFetch_a4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr i
CARD32 p = Fetch4(bits, i + x);
p |= p << 4;
- WRITE(buffer++, p << 24);
+ *buffer++ = p << 24;
}
}
@@ -424,7 +424,7 @@ fbFetch_r1g2b1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP
r = ((p & 0x8) * 0xff) << 13;
g = ((p & 0x6) * 0x55) << 7;
b = ((p & 0x1) * 0xff);
- WRITE(buffer++, 0xff000000|r|g|b);
+ *buffer++ = 0xff000000|r|g|b;
}
}
@@ -439,7 +439,7 @@ fbFetch_b1g2r1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP
b = ((p & 0x8) * 0xff) >> 3;
g = ((p & 0x6) * 0x55) << 7;
r = ((p & 0x1) * 0xff) << 16;
- WRITE(buffer++, 0xff000000|r|g|b);
+ *buffer++ = 0xff000000|r|g|b;
}
}
@@ -455,7 +455,7 @@ fbFetch_a1r1g1b1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
r = ((p & 0x4) * 0xff) << 14;
g = ((p & 0x2) * 0xff) << 7;
b = ((p & 0x1) * 0xff);
- WRITE(buffer++, a|r|g|b);
+ *buffer++ = a|r|g|b;
}
}
@@ -471,7 +471,7 @@ fbFetch_a1b1g1r1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
r = ((p & 0x4) * 0xff) >> 3;
g = ((p & 0x2) * 0xff) << 7;
b = ((p & 0x1) * 0xff) << 16;
- WRITE(buffer++, a|r|g|b);
+ *buffer++ = a|r|g|b;
}
}
@@ -482,7 +482,7 @@ fbFetch_c4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr i
for (i = 0; i < width; ++i) {
CARD32 p = Fetch4(bits, i + x);
- WRITE(buffer++, indexed->rgba[p]);
+ *buffer++ = indexed->rgba[p];
}
}
@@ -503,7 +503,7 @@ fbFetch_a1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr i
a |= a << 1;
a |= a << 2;
a |= a << 4;
- WRITE(buffer++, a << 24);
+ *buffer++ = a << 24;
}
}
@@ -520,7 +520,7 @@ fbFetch_g1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr i
a = p >> ((i+x) & 0x1f);
#endif
a = a & 1;
- WRITE(buffer++, indexed->rgba[a]);
+ *buffer++ = indexed->rgba[a];
}
}
@@ -585,19 +585,19 @@ typedef FASTCALL CARD32 (*fetchPixelProc)(const FbBits *bits, int offset, miInde
static FASTCALL CARD32
fbFetchPixel_a8r8g8b8 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- return READ((CARD32 *)bits + offset);
+ return ((CARD32 *)bits)[offset];
}
static FASTCALL CARD32
fbFetchPixel_x8r8g8b8 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- return READ((CARD32 *)bits + offset) | 0xff000000;
+ return ((CARD32 *)bits)[offset] | 0xff000000;
}
static FASTCALL CARD32
fbFetchPixel_a8b8g8r8 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD32 *)bits + offset);
+ CARD32 pixel = ((CARD32 *)bits)[offset];
return ((pixel & 0xff000000) |
((pixel >> 16) & 0xff) |
@@ -608,7 +608,7 @@ fbFetchPixel_a8b8g8r8 (const FbBits *bits, int offset, miIndexedPtr indexed)
static FASTCALL CARD32
fbFetchPixel_x8b8g8r8 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD32 *)bits + offset);
+ CARD32 pixel = ((CARD32 *)bits)[offset];
return ((0xff000000) |
((pixel >> 16) & 0xff) |
@@ -622,14 +622,14 @@ fbFetchPixel_r8g8b8 (const FbBits *bits, int offset, miIndexedPtr indexed)
CARD8 *pixel = ((CARD8 *) bits) + (offset*3);
#if IMAGE_BYTE_ORDER == MSBFirst
return (0xff000000 |
- (READ(pixel + 0) << 16) |
- (READ(pixel + 1) << 8) |
- (READ(pixel + 2)));
+ (pixel[0] << 16) |
+ (pixel[1] << 8) |
+ (pixel[2]));
#else
return (0xff000000 |
- (READ(pixel + 2) << 16) |
- (READ(pixel + 1) << 8) |
- (READ(pixel + 0)));
+ (pixel[2] << 16) |
+ (pixel[1] << 8) |
+ (pixel[0]));
#endif
}
@@ -639,21 +639,21 @@ fbFetchPixel_b8g8r8 (const FbBits *bits, int offset, miIndexedPtr indexed)
CARD8 *pixel = ((CARD8 *) bits) + (offset*3);
#if IMAGE_BYTE_ORDER == MSBFirst
return (0xff000000 |
- (READ(pixel + 2) << 16) |
- (READ(pixel + 1) << 8) |
- (READ(pixel + 0)));
+ (pixel[2] << 16) |
+ (pixel[1] << 8) |
+ (pixel[0]));
#else
return (0xff000000 |
- (READ(pixel + 0) << 16) |
- (READ(pixel + 1) << 8) |
- (READ(pixel + 2)));
+ (pixel[0] << 16) |
+ (pixel[1] << 8) |
+ (pixel[2]));
#endif
}
static FASTCALL CARD32
fbFetchPixel_r5g6b5 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD16 *) bits + offset);
+ CARD32 pixel = ((CARD16 *) bits)[offset];
CARD32 r,g,b;
r = ((pixel & 0xf800) | ((pixel & 0xe000) >> 5)) << 8;
@@ -665,7 +665,7 @@ fbFetchPixel_r5g6b5 (const FbBits *bits, int offset, miIndexedPtr indexed)
static FASTCALL CARD32
fbFetchPixel_b5g6r5 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD16 *) bits + offset);
+ CARD32 pixel = ((CARD16 *) bits)[offset];
CARD32 r,g,b;
b = ((pixel & 0xf800) | ((pixel & 0xe000) >> 5)) >> 8;
@@ -677,7 +677,7 @@ fbFetchPixel_b5g6r5 (const FbBits *bits, int offset, miIndexedPtr indexed)
static FASTCALL CARD32
fbFetchPixel_a1r5g5b5 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD16 *) bits + offset);
+ CARD32 pixel = ((CARD16 *) bits)[offset];
CARD32 a,r,g,b;
a = (CARD32) ((CARD8) (0 - ((pixel & 0x8000) >> 15))) << 24;
@@ -690,7 +690,7 @@ fbFetchPixel_a1r5g5b5 (const FbBits *bits, int offset, miIndexedPtr indexed)
static FASTCALL CARD32
fbFetchPixel_x1r5g5b5 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD16 *) bits + offset);
+ CARD32 pixel = ((CARD16 *) bits)[offset];
CARD32 r,g,b;
r = ((pixel & 0x7c00) | ((pixel & 0x7000) >> 5)) << 9;
@@ -702,7 +702,7 @@ fbFetchPixel_x1r5g5b5 (const FbBits *bits, int offset, miIndexedPtr indexed)
static FASTCALL CARD32
fbFetchPixel_a1b5g5r5 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD16 *) bits + offset);
+ CARD32 pixel = ((CARD16 *) bits)[offset];
CARD32 a,r,g,b;
a = (CARD32) ((CARD8) (0 - ((pixel & 0x8000) >> 15))) << 24;
@@ -715,7 +715,7 @@ fbFetchPixel_a1b5g5r5 (const FbBits *bits, int offset, miIndexedPtr indexed)
static FASTCALL CARD32
fbFetchPixel_x1b5g5r5 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD16 *) bits + offset);
+ CARD32 pixel = ((CARD16 *) bits)[offset];
CARD32 r,g,b;
b = ((pixel & 0x7c00) | ((pixel & 0x7000) >> 5)) >> 7;
@@ -727,7 +727,7 @@ fbFetchPixel_x1b5g5r5 (const FbBits *bits, int offset, miIndexedPtr indexed)
static FASTCALL CARD32
fbFetchPixel_a4r4g4b4 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD16 *) bits + offset);
+ CARD32 pixel = ((CARD16 *) bits)[offset];
CARD32 a,r,g,b;
a = ((pixel & 0xf000) | ((pixel & 0xf000) >> 4)) << 16;
@@ -740,7 +740,7 @@ fbFetchPixel_a4r4g4b4 (const FbBits *bits, int offset, miIndexedPtr indexed)
static FASTCALL CARD32
fbFetchPixel_x4r4g4b4 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD16 *) bits + offset);
+ CARD32 pixel = ((CARD16 *) bits)[offset];
CARD32 r,g,b;
r = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12;
@@ -752,7 +752,7 @@ fbFetchPixel_x4r4g4b4 (const FbBits *bits, int offset, miIndexedPtr indexed)
static FASTCALL CARD32
fbFetchPixel_a4b4g4r4 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD16 *) bits + offset);
+ CARD32 pixel = ((CARD16 *) bits)[offset];
CARD32 a,r,g,b;
a = ((pixel & 0xf000) | ((pixel & 0xf000) >> 4)) << 16;
@@ -765,7 +765,7 @@ fbFetchPixel_a4b4g4r4 (const FbBits *bits, int offset, miIndexedPtr indexed)
static FASTCALL CARD32
fbFetchPixel_x4b4g4r4 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD16 *) bits + offset);
+ CARD32 pixel = ((CARD16 *) bits)[offset];
CARD32 r,g,b;
b = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) >> 4;
@@ -777,7 +777,7 @@ fbFetchPixel_x4b4g4r4 (const FbBits *bits, int offset, miIndexedPtr indexed)
static FASTCALL CARD32
fbFetchPixel_a8 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD8 *) bits + offset);
+ CARD32 pixel = ((CARD8 *) bits)[offset];
return pixel << 24;
}
@@ -785,7 +785,7 @@ fbFetchPixel_a8 (const FbBits *bits, int offset, miIndexedPtr indexed)
static FASTCALL CARD32
fbFetchPixel_r3g3b2 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD8 *) bits + offset);
+ CARD32 pixel = ((CARD8 *) bits)[offset];
CARD32 r,g,b;
r = ((pixel & 0xe0) | ((pixel & 0xe0) >> 3) | ((pixel & 0xc0) >> 6)) << 16;
@@ -800,7 +800,7 @@ fbFetchPixel_r3g3b2 (const FbBits *bits, int offset, miIndexedPtr indexed)
static FASTCALL CARD32
fbFetchPixel_b2g3r3 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD8 *) bits + offset);
+ CARD32 pixel = ((CARD8 *) bits)[offset];
CARD32 r,g,b;
b = (((pixel & 0xc0) ) |
@@ -817,7 +817,7 @@ fbFetchPixel_b2g3r3 (const FbBits *bits, int offset, miIndexedPtr indexed)
static FASTCALL CARD32
fbFetchPixel_a2r2g2b2 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD8 *) bits + offset);
+ CARD32 pixel = ((CARD8 *) bits)[offset];
CARD32 a,r,g,b;
a = ((pixel & 0xc0) * 0x55) << 18;
@@ -830,7 +830,7 @@ fbFetchPixel_a2r2g2b2 (const FbBits *bits, int offset, miIndexedPtr indexed)
static FASTCALL CARD32
fbFetchPixel_a2b2g2r2 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD8 *) bits + offset);
+ CARD32 pixel = ((CARD8 *) bits)[offset];
CARD32 a,r,g,b;
a = ((pixel & 0xc0) * 0x55) << 18;
@@ -843,14 +843,14 @@ fbFetchPixel_a2b2g2r2 (const FbBits *bits, int offset, miIndexedPtr indexed)
static FASTCALL CARD32
fbFetchPixel_c8 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD8 *) bits + offset);
+ CARD32 pixel = ((CARD8 *) bits)[offset];
return indexed->rgba[pixel];
}
static FASTCALL CARD32
fbFetchPixel_x4a4 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
- CARD32 pixel = READ((CARD8 *) bits + offset);
+ CARD32 pixel = ((CARD8 *) bits)[offset];
return ((pixel & 0xf) | ((pixel & 0xf) << 4)) << 24;
}
@@ -1027,7 +1027,7 @@ typedef FASTCALL void (*storeProc) (FbBits *bits, const CARD32 *values, int x, i
static FASTCALL void
fbStore_a8r8g8b8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
{
- MEMCPY_WRAPPED(((CARD32 *)bits) + x, values, width*sizeof(CARD32));
+ memcpy(((CARD32 *)bits) + x, values, width*sizeof(CARD32));
}
static FASTCALL void
@@ -1036,7 +1036,7 @@ fbStore_x8r8g8b8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe
int i;
CARD32 *pixel = (CARD32 *)bits + x;
for (i = 0; i < width; ++i)
- WRITE(pixel++, READ(values + i) & 0xffffff);
+ *pixel++ = values[i] & 0xffffff;
}
static FASTCALL void
@@ -1045,7 +1045,7 @@ fbStore_a8b8g8r8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe
int i;
CARD32 *pixel = (CARD32 *)bits + x;
for (i = 0; i < width; ++i)
- WRITE(pixel++, (READ(values + i) & 0xff00ff00) | ((READ(values + i) >> 16) & 0xff) | ((READ(values + i) & 0xff) << 16));
+ *pixel++ = (values[i] & 0xff00ff00) | ((values[i] >> 16) & 0xff) | ((values[i] & 0xff) << 16);
}
static FASTCALL void
@@ -1054,7 +1054,7 @@ fbStore_x8b8g8r8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe
int i;
CARD32 *pixel = (CARD32 *)bits + x;
for (i = 0; i < width; ++i)
- WRITE(pixel++, (READ(values + i) & 0x0000ff00) | ((READ(values + i) >> 16) & 0xff) | ((READ(values + i) & 0xff) << 16));
+ *pixel++ = (values[i] & 0x0000ff00) | ((values[i] >> 16) & 0xff) | ((values[i] & 0xff) << 16);
}
static FASTCALL void
@@ -1063,7 +1063,7 @@ fbStore_r8g8b8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedP
int i;
CARD8 *pixel = ((CARD8 *) bits) + 3*x;
for (i = 0; i < width; ++i) {
- Store24(pixel, READ(values + i));
+ Store24(pixel, values[i]);
pixel += 3;
}
}
@@ -1074,15 +1074,14 @@ fbStore_b8g8r8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedP
int i;
CARD8 *pixel = ((CARD8 *) bits) + 3*x;
for (i = 0; i < width; ++i) {
- CARD32 val = READ(values + i);
#if IMAGE_BYTE_ORDER == MSBFirst
- WRITE(pixel++, Blue(val));
- WRITE(pixel++, Green(val));
- WRITE(pixel++, Red(val));
+ *pixel++ = Blue(values[i]);
+ *pixel++ = Green(values[i]);
+ *pixel++ = Red(values[i]);
#else
- WRITE(pixel++, Red(val));
- WRITE(pixel++, Green(val));
- WRITE(pixel++, Blue(val));
+ *pixel++ = Red(values[i]);
+ *pixel++ = Green(values[i]);
+ *pixel++ = Blue(values[i]);
#endif
}
}
@@ -1093,10 +1092,10 @@ fbStore_r5g6b5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedP
int i;
CARD16 *pixel = ((CARD16 *) bits) + x;
for (i = 0; i < width; ++i) {
- CARD32 s = READ(values + i);
- WRITE(pixel++, ((s >> 3) & 0x001f) |
- ((s >> 5) & 0x07e0) |
- ((s >> 8) & 0xf800));
+ CARD32 s = values[i];
+ *pixel++ = ((s >> 3) & 0x001f) |
+ ((s >> 5) & 0x07e0) |
+ ((s >> 8) & 0xf800);
}
}
@@ -1106,10 +1105,10 @@ fbStore_b5g6r5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedP
int i;
CARD16 *pixel = ((CARD16 *) bits) + x;
for (i = 0; i < width; ++i) {
- Split(READ(values + i));
- WRITE(pixel++, ((b << 8) & 0xf800) |
- ((g << 3) & 0x07e0) |
- ((r >> 3) ));
+ Split(values[i]);
+ *pixel++ = (((b << 8) & 0xf800) |
+ ((g << 3) & 0x07e0) |
+ ((r >> 3) ));
}
}
@@ -1119,11 +1118,11 @@ fbStore_a1r5g5b5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe
int i;
CARD16 *pixel = ((CARD16 *) bits) + x;
for (i = 0; i < width; ++i) {
- Splita(READ(values + i));
- WRITE(pixel++, ((a << 8) & 0x8000) |
- ((r << 7) & 0x7c00) |
- ((g << 2) & 0x03e0) |
- ((b >> 3) ));
+ Splita(values[i]);
+ *pixel++ = (((a << 8) & 0x8000) |
+ ((r << 7) & 0x7c00) |
+ ((g << 2) & 0x03e0) |
+ ((b >> 3) ));
}
}
@@ -1133,10 +1132,10 @@ fbStore_x1r5g5b5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe
int i;
CARD16 *pixel = ((CARD16 *) bits) + x;
for (i = 0; i < width; ++i) {
- Split(READ(values + i));
- WRITE(pixel++, ((r << 7) & 0x7c00) |
- ((g << 2) & 0x03e0) |
- ((b >> 3) ));
+ Split(values[i]);
+ *pixel++ = (((r << 7) & 0x7c00) |
+ ((g << 2) & 0x03e0) |
+ ((b >> 3) ));
}
}
@@ -1146,11 +1145,11 @@ fbStore_a1b5g5r5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe
int i;
CARD16 *pixel = ((CARD16 *) bits) + x;
for (i = 0; i < width; ++i) {
- Splita(READ(values + i));
- WRITE(pixel++, ((a << 8) & 0x8000) |
- ((b << 7) & 0x7c00) |
- ((g << 2) & 0x03e0) |
- ((r >> 3) ));
+ Splita(values[i]);
+ *pixel++ = (((a << 8) & 0x8000) |
+ ((b << 7) & 0x7c00) |
+ ((g << 2) & 0x03e0) |
+ ((r >> 3) ));
}
}
@@ -1160,10 +1159,10 @@ fbStore_x1b5g5r5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe
int i;
CARD16 *pixel = ((CARD16 *) bits) + x;
for (i = 0; i < width; ++i) {
- Split(READ(values + i));
- WRITE(pixel++, ((b << 7) & 0x7c00) |
- ((g << 2) & 0x03e0) |
- ((r >> 3) ));
+ Split(values[i]);
+ *pixel++ = (((b << 7) & 0x7c00) |
+ ((g << 2) & 0x03e0) |
+ ((r >> 3) ));
}
}
@@ -1173,11 +1172,11 @@ fbStore_a4r4g4b4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe
int i;
CARD16 *pixel = ((CARD16 *) bits) + x;
for (i = 0; i < width; ++i) {
- Splita(READ(values + i));
- WRITE(pixel++, ((a << 8) & 0xf000) |
- ((r << 4) & 0x0f00) |
- ((g ) & 0x00f0) |
- ((b >> 4) ));
+ Splita(values[i]);
+ *pixel++ = (((a << 8) & 0xf000) |
+ ((r << 4) & 0x0f00) |
+ ((g ) & 0x00f0) |
+ ((b >> 4) ));
}
}
@@ -1187,10 +1186,10 @@ fbStore_x4r4g4b4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe
int i;
CARD16 *pixel = ((CARD16 *) bits) + x;
for (i = 0; i < width; ++i) {
- Split(READ(values + i));
- WRITE(pixel++, ((r << 4) & 0x0f00) |
- ((g ) & 0x00f0) |
- ((b >> 4) ));
+ Split(values[i]);
+ *pixel++ = (((r << 4) & 0x0f00) |
+ ((g ) & 0x00f0) |
+ ((b >> 4) ));
}
}
@@ -1200,11 +1199,11 @@ fbStore_a4b4g4r4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe
int i;
CARD16 *pixel = ((CARD16 *) bits) + x;
for (i = 0; i < width; ++i) {
- Splita(READ(values + i));
- WRITE(pixel++, ((a << 8) & 0xf000) |
- ((b << 4) & 0x0f00) |
- ((g ) & 0x00f0) |
- ((r >> 4) ));
+ Splita(values[i]);
+ *pixel++ = (((a << 8) & 0xf000) |
+ ((b << 4) & 0x0f00) |
+ ((g ) & 0x00f0) |
+ ((r >> 4) ));
}
}
@@ -1214,10 +1213,10 @@ fbStore_x4b4g4r4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe
int i;
CARD16 *pixel = ((CARD16 *) bits) + x;
for (i = 0; i < width; ++i) {
- Split(READ(values + i));
- WRITE(pixel++, ((b << 4) & 0x0f00) |
- ((g ) & 0x00f0) |
- ((r >> 4) ));
+ Split(values[i]);
+ *pixel++ = (((b << 4) & 0x0f00) |
+ ((g ) & 0x00f0) |
+ ((r >> 4) ));
}
}
@@ -1227,7 +1226,7 @@ fbStore_a8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr i
int i;
CARD8 *pixel = ((CARD8 *) bits) + x;
for (i = 0; i < width; ++i) {
- WRITE(pixel++, READ(values + i) >> 24);
+ *pixel++ = values[i] >> 24;
}
}
@@ -1237,10 +1236,10 @@ fbStore_r3g3b2 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedP
int i;
CARD8 *pixel = ((CARD8 *) bits) + x;
for (i = 0; i < width; ++i) {
- Split(READ(values + i));
- WRITE(pixel++, ((r ) & 0xe0) |
- ((g >> 3) & 0x1c) |
- ((b >> 6) ));
+ Split(values[i]);
+ *pixel++ = (((r ) & 0xe0) |
+ ((g >> 3) & 0x1c) |
+ ((b >> 6) ));
}
}
@@ -1250,10 +1249,10 @@ fbStore_b2g3r3 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedP
int i;
CARD8 *pixel = ((CARD8 *) bits) + x;
for (i = 0; i < width; ++i) {
- Split(READ(values + i));
- WRITE(pixel++, ((b ) & 0xe0) |
- ((g >> 3) & 0x1c) |
- ((r >> 6) ));
+ Split(values[i]);
+ *pixel++ = (((b ) & 0xe0) |
+ ((g >> 3) & 0x1c) |
+ ((r >> 6) ));
}
}
@@ -1263,11 +1262,11 @@ fbStore_a2r2g2b2 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe
int i;
CARD8 *pixel = ((CARD8 *) bits) + x;
for (i = 0; i < width; ++i) {
- Splita(READ(values + i));
- WRITE(pixel++, ((a ) & 0xc0) |
- ((r >> 2) & 0x30) |
- ((g >> 4) & 0x0c) |
- ((b >> 6) ));
+ Splita(values[i]);
+ *pixel++ = (((a ) & 0xc0) |
+ ((r >> 2) & 0x30) |
+ ((g >> 4) & 0x0c) |
+ ((b >> 6) ));
}
}
@@ -1277,7 +1276,7 @@ fbStore_c8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr i
int i;
CARD8 *pixel = ((CARD8 *) bits) + x;
for (i = 0; i < width; ++i) {
- WRITE(pixel++, miIndexToEnt24(indexed,READ(values + i)));
+ *pixel++ = miIndexToEnt24(indexed,values[i]);
}
}
@@ -1287,7 +1286,7 @@ fbStore_x4a4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr
int i;
CARD8 *pixel = ((CARD8 *) bits) + x;
for (i = 0; i < width; ++i) {
- WRITE(pixel++, READ(values + i) >> 28);
+ *pixel++ = values[i] >> 28;
}
}
@@ -1307,7 +1306,7 @@ fbStore_a4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr i
{
int i;
for (i = 0; i < width; ++i) {
- Store4(bits, i + x, READ(values + i)>>28);
+ Store4(bits, i + x, values[i]>>28);
}
}
@@ -1318,7 +1317,7 @@ fbStore_r1g2b1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedP
for (i = 0; i < width; ++i) {
CARD32 pixel;
- Split(READ(values + i));
+ Split(values[i]);
pixel = (((r >> 4) & 0x8) |
((g >> 5) & 0x6) |
((b >> 7) ));
@@ -1333,7 +1332,7 @@ fbStore_b1g2r1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedP
for (i = 0; i < width; ++i) {
CARD32 pixel;
- Split(READ(values + i));
+ Split(values[i]);
pixel = (((b >> 4) & 0x8) |
((g >> 5) & 0x6) |
((r >> 7) ));
@@ -1347,7 +1346,7 @@ fbStore_a1r1g1b1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe
int i;
for (i = 0; i < width; ++i) {
CARD32 pixel;
- Splita(READ(values + i));
+ Splita(values[i]);
pixel = (((a >> 4) & 0x8) |
((r >> 5) & 0x4) |
((g >> 6) & 0x2) |
@@ -1362,7 +1361,7 @@ fbStore_a1b1g1r1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe
int i;
for (i = 0; i < width; ++i) {
CARD32 pixel;
- Splita(READ(values + i));
+ Splita(values[i]);
pixel = (((a >> 4) & 0x8) |
((b >> 5) & 0x4) |
((g >> 6) & 0x2) |
@@ -1378,7 +1377,7 @@ fbStore_c4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr i
for (i = 0; i < width; ++i) {
CARD32 pixel;
- pixel = miIndexToEnt24(indexed, READ(values + i));
+ pixel = miIndexToEnt24(indexed, values[i]);
Store4(bits, i + x, pixel);
}
}
@@ -1391,8 +1390,8 @@ fbStore_a1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr i
CARD32 *pixel = ((CARD32 *) bits) + ((i+x) >> 5);
CARD32 mask = FbStipMask((i+x) & 0x1f, 1);
- CARD32 v = READ(values + i) & 0x80000000 ? mask : 0;
- WRITE(pixel, (READ(pixel) & ~mask) | v);
+ CARD32 v = values[i] & 0x80000000 ? mask : 0;
+ *pixel = (*pixel & ~mask) | v;
}
}
@@ -1404,8 +1403,8 @@ fbStore_g1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr i
CARD32 *pixel = ((CARD32 *) bits) + ((i+x) >> 5);
CARD32 mask = FbStipMask((i+x) & 0x1f, 1);
- CARD32 v = miIndexToEntY24(indexed,READ(values + i)) ? mask : 0;
- WRITE(pixel, (READ(pixel) & ~mask) | v);
+ CARD32 v = miIndexToEntY24(indexed,values[i]) ? mask : 0;
+ *pixel = (*pixel & ~mask) | v;
}
}
@@ -1470,10 +1469,10 @@ fbCombineMaskU (CARD32 *src, const CARD32 *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 a = READ(mask + i) >> 24;
- CARD32 s = READ(src + i);
+ CARD32 a = mask[i] >> 24;
+ CARD32 s = src[i];
FbByteMul(s, a);
- WRITE(src + i, s);
+ src[i] = s;
}
}
@@ -1484,13 +1483,13 @@ fbCombineMaskU (CARD32 *src, const CARD32 *mask, int width)
static FASTCALL void
fbCombineClear (CARD32 *dest, const CARD32 *src, int width)
{
- MEMSET_WRAPPED(dest, 0, width*sizeof(CARD32));
+ memset(dest, 0, width*sizeof(CARD32));
}
static FASTCALL void
fbCombineSrcU (CARD32 *dest, const CARD32 *src, int width)
{
- MEMCPY_WRAPPED(dest, src, width*sizeof(CARD32));
+ memcpy(dest, src, width*sizeof(CARD32));
}
@@ -1499,12 +1498,12 @@ fbCombineOverU (CARD32 *dest, const CARD32 *src, int width)
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 s = READ(src + i);
- CARD32 d = READ(dest + i);
+ CARD32 s = src[i];
+ CARD32 d = dest[i];
CARD32 ia = Alpha(~s);
FbByteMulAdd(d, ia, s);
- WRITE(dest + i, d);
+ dest[i] = d;
}
}
@@ -1513,11 +1512,11 @@ fbCombineOverReverseU (CARD32 *dest, const CARD32 *src, int width)
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 s = READ(src + i);
- CARD32 d = READ(dest + i);
- CARD32 ia = Alpha(~READ(dest + i));
+ CARD32 s = src[i];
+ CARD32 d = dest[i];
+ CARD32 ia = Alpha(~dest[i]);
FbByteMulAdd(s, ia, d);
- WRITE(dest + i, s);
+ dest[i] = s;
}
}
@@ -1526,10 +1525,10 @@ fbCombineInU (CARD32 *dest, const CARD32 *src, int width)
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 s = READ(src + i);
- CARD32 a = Alpha(READ(dest + i));
+ CARD32 s = src[i];
+ CARD32 a = Alpha(dest[i]);
FbByteMul(s, a);
- WRITE(dest + i, s);
+ dest[i] = s;
}
}
@@ -1538,10 +1537,10 @@ fbCombineInReverseU (CARD32 *dest, const CARD32 *src, int width)
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 d = READ(dest + i);
- CARD32 a = Alpha(READ(src + i));
+ CARD32 d = dest[i];
+ CARD32 a = Alpha(src[i]);
FbByteMul(d, a);
- WRITE(dest + i, d);
+ dest[i] = d;
}
}
@@ -1550,10 +1549,10 @@ fbCombineOutU (CARD32 *dest, const CARD32 *src, int width)
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 s = READ(src + i);
- CARD32 a = Alpha(~READ(dest + i));
+ CARD32 s = src[i];
+ CARD32 a = Alpha(~dest[i]);
FbByteMul(s, a);
- WRITE(dest + i, s);
+ dest[i] = s;
}
}
@@ -1562,10 +1561,10 @@ fbCombineOutReverseU (CARD32 *dest, const CARD32 *src, int width)
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 d = READ(dest + i);
- CARD32 a = Alpha(~READ(src + i));
+ CARD32 d = dest[i];
+ CARD32 a = Alpha(~src[i]);
FbByteMul(d, a);
- WRITE(dest + i, d);
+ dest[i] = d;
}
}
@@ -1574,13 +1573,13 @@ fbCombineAtopU (CARD32 *dest, const CARD32 *src, int width)
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 s = READ(src + i);
- CARD32 d = READ(dest + i);
+ CARD32 s = src[i];
+ CARD32 d = dest[i];
CARD32 dest_a = Alpha(d);
CARD32 src_ia = Alpha(~s);
FbByteAddMul(s, dest_a, d, src_ia);
- WRITE(dest + i, s);
+ dest[i] = s;
}
}
@@ -1589,13 +1588,13 @@ fbCombineAtopReverseU (CARD32 *dest, const CARD32 *src, int width)
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 s = READ(src + i);
- CARD32 d = READ(dest + i);
+ CARD32 s = src[i];
+ CARD32 d = dest[i];
CARD32 src_a = Alpha(s);
CARD32 dest_ia = Alpha(~d);
FbByteAddMul(s, dest_ia, d, src_a);
- WRITE(dest + i, s);
+ dest[i] = s;
}
}
@@ -1604,13 +1603,13 @@ fbCombineXorU (CARD32 *dest, const CARD32 *src, int width)
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 s = READ(src + i);
- CARD32 d = READ(dest + i);
+ CARD32 s = src[i];
+ CARD32 d = dest[i];
CARD32 src_ia = Alpha(~s);
CARD32 dest_ia = Alpha(~d);
FbByteAddMul(s, dest_ia, d, src_ia);
- WRITE(dest + i, s);
+ dest[i] = s;
}
}
@@ -1619,10 +1618,10 @@ fbCombineAddU (CARD32 *dest, const CARD32 *src, int width)
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 s = READ(src + i);
- CARD32 d = READ(dest + i);
+ CARD32 s = src[i];
+ CARD32 d = dest[i];
FbByteAdd(d, s);
- WRITE(dest + i, d);
+ dest[i] = d;
}
}
@@ -1631,8 +1630,8 @@ fbCombineSaturateU (CARD32 *dest, const CARD32 *src, int width)
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 s = READ(src + i);
- CARD32 d = READ(dest + i);
+ CARD32 s = src[i];
+ CARD32 d = dest[i];
CARD16 sa, da;
sa = s >> 24;
@@ -1643,7 +1642,7 @@ fbCombineSaturateU (CARD32 *dest, const CARD32 *src, int width)
FbByteMul(s, sa);
}
FbByteAdd(d, s);
- WRITE(dest + i, d);
+ dest[i] = d;
}
}
@@ -1717,8 +1716,8 @@ fbCombineDisjointGeneralU (CARD32 *dest, const CARD32 *src, int width, CARD8 com
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 s = READ(src + i);
- CARD32 d = READ(dest + i);
+ CARD32 s = src[i];
+ CARD32 d = dest[i];
CARD32 m,n,o,p;
CARD16 Fa, Fb, t, u, v;
CARD8 sa = s >> 24;
@@ -1758,7 +1757,7 @@ fbCombineDisjointGeneralU (CARD32 *dest, const CARD32 *src, int width, CARD8 com
o = FbGen (s,d,16,Fa,Fb,t, u, v);
p = FbGen (s,d,24,Fa,Fb,t, u, v);
s = m|n|o|p;
- WRITE(dest + i, s);
+ dest[i] = s;
}
}
@@ -1767,19 +1766,19 @@ fbCombineDisjointOverU (CARD32 *dest, const CARD32 *src, int width)
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 s = READ(src + i);
+ CARD32 s = src[i];
CARD16 a = s >> 24;
if (a != 0x00)
{
if (a != 0xff)
{
- CARD32 d = READ(dest + i);
+ CARD32 d = dest[i];
a = fbCombineDisjointOutPart (d >> 24, a);
FbByteMulAdd(d, a, s);
s = d;
}
- WRITE(dest + i, s);
+ dest[i] = s;
}
}
}
@@ -1856,8 +1855,8 @@ fbCombineConjointGeneralU (CARD32 *dest, const CARD32 *src, int width, CARD8 com
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 s = READ(src + i);
- CARD32 d = READ(dest + i);
+ CARD32 s = src[i];
+ CARD32 d = dest[i];
CARD32 m,n,o,p;
CARD16 Fa, Fb, t, u, v;
CARD8 sa = s >> 24;
@@ -1897,7 +1896,7 @@ fbCombineConjointGeneralU (CARD32 *dest, const CARD32 *src, int width, CARD8 com
o = FbGen (s,d,16,Fa,Fb,t, u, v);
p = FbGen (s,d,24,Fa,Fb,t, u, v);
s = m|n|o|p;
- WRITE(dest + i, s);
+ dest[i] = s;
}
}
@@ -2010,32 +2009,32 @@ fbCombineMaskC (CARD32 *src, CARD32 *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 a = READ(mask + i);
+ CARD32 a = mask[i];
CARD32 x;
CARD16 xa;
if (!a)
{
- WRITE(src + i, 0);
+ src[i] = 0;
continue;
}
- x = READ(src + i);
+ x = src[i];
if (a == 0xffffffff)
{
x = x >> 24;
x |= x << 8;
x |= x << 16;
- WRITE(mask + i, x);
+ mask[i] = x;
continue;
}
xa = x >> 24;
FbByteMulC(x, a);
- WRITE(src + i, x);
+ src[i] = x;
FbByteMul(a, xa);
- WRITE(mask + i, a);
+ mask[i] = a;
}
}
@@ -2044,21 +2043,21 @@ fbCombineMaskValueC (CARD32 *src, const CARD32 *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 a = READ(mask + i);
+ CARD32 a = mask[i];
CARD32 x;
if (!a)
{
- WRITE(src + i, 0);
+ src[i] = 0;
continue;
}
if (a == 0xffffffff)
continue;
- x = READ(src + i);
+ x = src[i];
FbByteMulC(x, a);
- WRITE(src + i, x);
+ src[i] = x;
}
}
@@ -2068,13 +2067,13 @@ fbCombineMaskAlphaC (const CARD32 *src, CARD32 *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
- CARD32 a = READ(mask + i);
+ CARD32 a = mask[i];
CARD32 x;
if (!a)
continue;
- x = READ(src + i) >> 24;
+ x = src[i] >> 24;
if (x == 0xff)
continue;
if (a == 0xffffffff)
@@ -2082,12 +2081,12 @@ fbCombineMaskAlphaC (const CARD32 *src, CARD32 *mask, int width)
x = x >> 24;
x |= x << 8;
x |= x << 16;
- WRITE(mask + i, x);
+ mask[i] = x;
continue;
}
FbByteMul(a, x);
- WRITE(mask + i, a);
+ mask[i] = a;
}
}
@@ -2101,7 +2100,7 @@ static FASTCALL void
fbCombineSrcC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
{
fbCombineMaskValueC(src, mask, width);
- MEMCPY_WRAPPED(dest, src, width*sizeof(CARD32));
+ memcpy(dest, src, width*sizeof(CARD32));
}
static FASTCALL void
@@ -2110,18 +2109,18 @@ fbCombineOverC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
int i;
fbCombineMaskC(src, mask, width);
for (i = 0; i < width; ++i) {
- CARD32 s = READ(src + i);
- CARD32 a = ~READ(mask + i);
+ CARD32 s = src[i];
+ CARD32 a = ~mask[i];
if (a != 0xffffffff)
{
if (a)
{
- CARD32 d = READ(dest + i);
+ CARD32 d = dest[i];
FbByteMulAddC(d, a, s);
s = d;
}
- WRITE(dest + i, s);
+ dest[i] = s;
}
}
}
@@ -2132,17 +2131,17 @@ fbCombineOverReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
int i;
fbCombineMaskValueC(src, mask, width);
for (i = 0; i < width; ++i) {
- CARD32 d = READ(dest + i);
+ CARD32 d = dest[i];
CARD32 a = ~d >> 24;
if (a)
{
- CARD32 s = READ(src + i);
+ CARD32 s = src[i];
if (a != 0xff)
{
FbByteMulAdd(s, a, d);
}
- WRITE(dest + i, s);
+ dest[i] = s;
}
}
}
@@ -2153,18 +2152,18 @@ fbCombineInC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
int i;
fbCombineMaskValueC(src, mask, width);
for (i = 0; i < width; ++i) {
- CARD32 d = READ(dest + i);
+ CARD32 d = dest[i];
CARD16 a = d >> 24;
CARD32 s = 0;
if (a)
{
- s = READ(src + i);
+ s = src[i];
if (a != 0xff)
{
FbByteMul(s, a);
}
}
- WRITE(dest + i, s);
+ dest[i] = s;
}
}
@@ -2174,17 +2173,17 @@ fbCombineInReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
int i;
fbCombineMaskAlphaC(src, mask, width);
for (i = 0; i < width; ++i) {
- CARD32 a = READ(mask + i);
+ CARD32 a = mask[i];
if (a != 0xffffffff)
{
CARD32 d = 0;
if (a)
{
- d = READ(dest + i);
+ d = dest[i];
FbByteMulC(d, a);
}
- WRITE(dest + i, d);
+ dest[i] = d;
}
}
}
@@ -2195,18 +2194,18 @@ fbCombineOutC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
int i;
fbCombineMaskValueC(src, mask, width);
for (i = 0; i < width; ++i) {
- CARD32 d = READ(dest + i);
+ CARD32 d = dest[i];
CARD16 a = ~d >> 24;
CARD32 s = 0;
if (a)
{
- s = READ(src + i);
+ s = src[i];
if (a != 0xff)
{
FbByteMul(s, a);
}
}
- WRITE(dest + i, s);
+ dest[i] = s;
}
}
@@ -2216,17 +2215,17 @@ fbCombineOutReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
int i;
fbCombineMaskAlphaC(src, mask, width);
for (i = 0; i < width; ++i) {
- CARD32 a = ~READ(mask + i);
+ CARD32 a = ~mask[i];
if (a != 0xffffffff)
{
CARD32 d = 0;
if (a)
{
- d = READ(dest + i);
+ d = dest[i];
FbByteMulC(d, a);
}
- WRITE(dest + i, d);
+ dest[i] = d;
}
}
}
@@ -2237,12 +2236,12 @@ fbCombineAtopC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
int i;
fbCombineMaskC(src, mask, width);
for (i = 0; i < width; ++i) {
- CARD32 d = READ(dest + i);
- CARD32 s = READ(src + i);
- CARD32 ad = ~READ(mask + i);
+ CARD32 d = dest[i];
+ CARD32 s = src[i];
+ CARD32 ad = ~mask[i];
CARD16 as = d >> 24;
FbByteAddMulC(d, ad, s, as);
- WRITE(dest + i, d);
+ dest[i] = d;
}
}
@@ -2253,12 +2252,12 @@ fbCombineAtopReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
fbCombineMaskC(src, mask, width);
for (i = 0; i < width; ++i) {
- CARD32 d = READ(dest + i);
- CARD32 s = READ(src + i);
- CARD32 ad = READ(mask + i);
+ CARD32 d = dest[i];
+ CARD32 s = src[i];
+ CARD32 ad = mask[i];
CARD16 as = ~d >> 24;
FbByteAddMulC(d, ad, s, as);
- WRITE(dest + i, d);
+ dest[i] = d;
}
}
@@ -2268,12 +2267,12 @@ fbCombineXorC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
int i;
fbCombineMaskC(src, mask, width);
for (i = 0; i < width; ++i) {
- CARD32 d = READ(dest + i);
- CARD32 s = READ(src + i);
- CARD32 ad = ~READ(mask + i);
+ CARD32 d = dest[i];
+ CARD32 s = src[i];
+ CARD32 ad = ~mask[i];
CARD16 as = ~d >> 24;
FbByteAddMulC(d, ad, s, as);
- WRITE(dest + i, d);
+ dest[i] = d;
}
}
@@ -2283,10 +2282,10 @@ fbCombineAddC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
int i;
fbCombineMaskValueC(src, mask, width);
for (i = 0; i < width; ++i) {
- CARD32 s = READ(src + i);
- CARD32 d = READ(dest + i);
+ CARD32 s = src[i];
+ CARD32 d = dest[i];
FbByteAdd(d, s);
- WRITE(dest + i, d);
+ dest[i] = d;
}
}
@@ -2301,12 +2300,12 @@ fbCombineSaturateC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
CARD16 t, u, v;
CARD32 m,n,o,p;
- d = READ(dest + i);
- s = READ(src + i);
- sa = (READ(mask + i) >> 24);
- sr = (READ(mask + i) >> 16) & 0xff;
- sg = (READ(mask + i) >> 8) & 0xff;
- sb = (READ(mask + i) ) & 0xff;
+ d = dest[i];
+ s = src[i];
+ sa = (mask[i] >> 24);
+ sr = (mask[i] >> 16) & 0xff;
+ sg = (mask[i] >> 8) & 0xff;
+ sb = (mask[i] ) & 0xff;
da = ~d >> 24;
if (sb <= da)
@@ -2329,7 +2328,7 @@ fbCombineSaturateC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
else
p = FbGen (s, d, 24, (da << 8) / sa, 0xff, t, u, v);
- WRITE(dest + i, m|n|o|p);
+ dest[i] = m|n|o|p;
}
}
@@ -2346,9 +2345,9 @@ fbCombineDisjointGeneralC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width, C
CARD32 sa;
CARD8 da;
- s = READ(src + i);
- sa = READ(mask + i);
- d = READ(dest + i);
+ s = src[i];
+ sa = mask[i];
+ d = dest[i];
da = d >> 24;
switch (combine & CombineA) {
@@ -2401,7 +2400,7 @@ fbCombineDisjointGeneralC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width, C
o = FbGen (s,d,16,FbGet8(Fa,16),FbGet8(Fb,16),t, u, v);
p = FbGen (s,d,24,FbGet8(Fa,24),FbGet8(Fb,24),t, u, v);
s = m|n|o|p;
- WRITE(dest + i, s);
+ dest[i] = s;
}
}
@@ -2466,9 +2465,9 @@ fbCombineConjointGeneralC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width, C
CARD32 sa;
CARD8 da;
- s = READ(src + i);
- sa = READ(mask + i);
- d = READ(dest + i);
+ s = src[i];
+ sa = mask[i];
+ d = dest[i];
da = d >> 24;
switch (combine & CombineA) {
@@ -2521,7 +2520,7 @@ fbCombineConjointGeneralC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width, C
o = FbGen (s,d,16,FbGet8(Fa,16),FbGet8(Fb,16),t, u, v);
p = FbGen (s,d,24,FbGet8(Fa,24),FbGet8(Fb,24),t, u, v);
s = m|n|o|p;
- WRITE(dest + i, s);
+ dest[i] = s;
}
}
@@ -2652,8 +2651,7 @@ static void fbFetchSolid(PicturePtr pict, int x, int y, int width, CARD32 *buffe
end = buffer + width;
while (buffer < end)
- WRITE(buffer++, color);
- fbFinishAccess (pict->pDrawable);
+ *buffer++ = color;
}
static void fbFetch(PicturePtr pict, int x, int y, int width, CARD32 *buffer)
@@ -2672,7 +2670,6 @@ static void fbFetch(PicturePtr pict, int x, int y, int width, CARD32 *buffer)
bits += y*stride;
fetch(bits, x, width, buffer, indexed);
- fbFinishAccess (pict->pDrawable);
}
#define MOD(a,b) ((a) < 0 ? ((b) - ((-(a) - 1) % (b))) - 1 : (a) % (b))
@@ -2720,7 +2717,7 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 *
if (pGradient->type == SourcePictTypeSolidFill) {
register CARD32 color = pGradient->solidFill.color;
while (buffer < end) {
- WRITE(buffer++, color);
+ *buffer++ = color;
}
} else if (pGradient->type == SourcePictTypeLinear) {
PictVector v, unit;
@@ -2762,7 +2759,7 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 *
inc = (a * unit.vector[0] + b * unit.vector[1]) >> 16;
}
while (buffer < end) {
- WRITE(buffer++, gradientPixel(pGradient, t, pict->repeatType));
+ *buffer++ = gradientPixel(pGradient, t, pict->repeatType);
t += inc;
}
} else {
@@ -2777,7 +2774,7 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 *
y = ((xFixed_48_16)v.vector[1] << 16) / v.vector[2];
t = ((a*x + b*y) >> 16) + off;
}
- WRITE(buffer++, gradientPixel(pGradient, t, pict->repeatType));
+ *buffer++ = gradientPixel(pGradient, t, pict->repeatType);
v.vector[0] += unit.vector[0];
v.vector[1] += unit.vector[1];
v.vector[2] += unit.vector[2];
@@ -2821,9 +2818,9 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 *
double c = -(rx*rx + ry*ry);
double det = (b * b) - (4 * pGradient->radial.a * c);
double s = (-b + sqrt(det))/(2. * pGradient->radial.a);
- WRITE(buffer, gradientPixel(pGradient,
- (xFixed_48_16)((s*pGradient->radial.m + pGradient->radial.b)*65536),
- pict->repeatType));
+ *buffer = gradientPixel(pGradient,
+ (xFixed_48_16)((s*pGradient->radial.m + pGradient->radial.b)*65536),
+ pict->repeatType);
++buffer;
rx += cx;
ry += cy;
@@ -2844,9 +2841,9 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 *
c = -(x*x + y*y);
det = (b * b) - (4 * pGradient->radial.a * c);
s = (-b + sqrt(det))/(2. * pGradient->radial.a);
- WRITE(buffer, gradientPixel(pGradient,
- (xFixed_48_16)((s*pGradient->radial.m + pGradient->radial.b)*65536),
- pict->repeatType));
+ *buffer = gradientPixel(pGradient,
+ (xFixed_48_16)((s*pGradient->radial.m + pGradient->radial.b)*65536),
+ pict->repeatType);
++buffer;
rx += cx;
ry += cy;
@@ -2861,8 +2858,8 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 *
while (buffer < end) {
double angle = atan2(ry, rx) + a;
- WRITE(buffer, gradientPixel(pGradient, (xFixed_48_16) (angle * (65536. / (2*M_PI))),
- pict->repeatType));
+ *buffer = gradientPixel(pGradient, (xFixed_48_16) (angle * (65536. / (2*M_PI))),
+ pict->repeatType);
++buffer;
rx += cx;
ry += cy;
@@ -2880,8 +2877,8 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 *
x -= pGradient->conical.center.x/65536.;
y -= pGradient->conical.center.y/65536.;
angle = atan2(y, x) + a;
- WRITE(buffer, gradientPixel(pGradient, (xFixed_48_16) (angle * (65536. / (2*M_PI))),
- pict->repeatType));
+ *buffer = gradientPixel(pGradient, (xFixed_48_16) (angle * (65536. / (2*M_PI))),
+ pict->repeatType);
++buffer;
rx += cx;
ry += cy;
@@ -2924,10 +2921,8 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
/* when using convolution filters one might get here without a transform */
if (pict->transform) {
- if (!PictureTransformPoint3d (pict->transform, &v)) {
- fbFinishAccess (pict->pDrawable);
+ if (!PictureTransformPoint3d (pict->transform, &v))
return;
- }
unit.vector[0] = pict->transform->matrix[0][0];
unit.vector[1] = pict->transform->matrix[1][0];
unit.vector[2] = pict->transform->matrix[2][0];
@@ -2944,7 +2939,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
- WRITE(buffer + i, 0);
+ buffer[i] = 0;
} else {
if (!affine) {
y = MOD(DIV(v.vector[1],v.vector[2]), pict->pDrawable->height);
@@ -2953,7 +2948,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
y = MOD(v.vector[1]>>16, pict->pDrawable->height);
x = MOD(v.vector[0]>>16, pict->pDrawable->width);
}
- WRITE(buffer + i, fetch(bits + (y + dy)*stride, x + dx, indexed));
+ buffer[i] = fetch(bits + (y + dy)*stride, x + dx, indexed);
}
v.vector[0] += unit.vector[0];
v.vector[1] += unit.vector[1];
@@ -2962,7 +2957,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
} else {
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
- WRITE(buffer + i, 0);
+ buffer[i] = 0;
} else {
if (!affine) {
y = MOD(DIV(v.vector[1],v.vector[2]), pict->pDrawable->height);
@@ -2972,9 +2967,9 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
x = MOD(v.vector[0]>>16, pict->pDrawable->width);
}
if (POINT_IN_REGION (0, pict->pCompositeClip, x + dx, y + dy, &box))
- WRITE(buffer + i, fetch(bits + (y + dy)*stride, x + dx, indexed));
+ buffer[i] = fetch(bits + (y + dy)*stride, x + dx, indexed);
else
- WRITE(buffer + i, 0);
+ buffer[i] = 0;
}
v.vector[0] += unit.vector[0];
v.vector[1] += unit.vector[1];
@@ -2986,7 +2981,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
box = pict->pCompositeClip->extents;
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
- WRITE(buffer + i, 0);
+ buffer[i] = 0;
} else {
if (!affine) {
y = DIV(v.vector[1],v.vector[2]);
@@ -2995,8 +2990,8 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
y = v.vector[1]>>16;
x = v.vector[0]>>16;
}
- WRITE(buffer + i, ((x < box.x1-dx) | (x >= box.x2-dx) | (y < box.y1-dy) | (y >= box.y2-dy)) ?
- 0 : fetch(bits + (y + dy)*stride, x + dx, indexed));
+ buffer[i] = ((x < box.x1-dx) | (x >= box.x2-dx) | (y < box.y1-dy) | (y >= box.y2-dy)) ?
+ 0 : fetch(bits + (y + dy)*stride, x + dx, indexed);
}
v.vector[0] += unit.vector[0];
v.vector[1] += unit.vector[1];
@@ -3005,7 +3000,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
} else {
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
- WRITE(buffer + i, 0);
+ buffer[i] = 0;
} else {
if (!affine) {
y = DIV(v.vector[1],v.vector[2]);
@@ -3015,9 +3010,9 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
x = v.vector[0]>>16;
}
if (POINT_IN_REGION (0, pict->pCompositeClip, x + dx, y + dy, &box))
- WRITE(buffer + i, fetch(bits + (y + dy)*stride, x + dx, indexed));
+ buffer[i] = fetch(bits + (y + dy)*stride, x + dx, indexed);
else
- WRITE(buffer + i, 0);
+ buffer[i] = 0;
}
v.vector[0] += unit.vector[0];
v.vector[1] += unit.vector[1];
@@ -3036,7 +3031,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
- WRITE(buffer + i, 0);
+ buffer[i] = 0;
} else {
int x1, x2, y1, y2, distx, idistx, disty, idisty;
FbBits *b;
@@ -3088,7 +3083,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
ft = FbGet8(tl,24) * idistx + FbGet8(tr,24) * distx;
fb = FbGet8(bl,24) * idistx + FbGet8(br,24) * distx;
r |= (((ft * idisty + fb * disty) << 8) & 0xff000000);
- WRITE(buffer + i, r);
+ buffer[i] = r;
}
v.vector[0] += unit.vector[0];
v.vector[1] += unit.vector[1];
@@ -3097,7 +3092,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
} else {
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
- WRITE(buffer + i, 0);
+ buffer[i] = 0;
} else {
int x1, x2, y1, y2, distx, idistx, disty, idisty;
FbBits *b;
@@ -3153,7 +3148,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
ft = FbGet8(tl,24) * idistx + FbGet8(tr,24) * distx;
fb = FbGet8(bl,24) * idistx + FbGet8(br,24) * distx;
r |= (((ft * idisty + fb * disty) << 8) & 0xff000000);
- WRITE(buffer + i, r);
+ buffer[i] = r;
}
v.vector[0] += unit.vector[0];
v.vector[1] += unit.vector[1];
@@ -3165,7 +3160,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
box = pict->pCompositeClip->extents;
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
- WRITE(buffer + i, 0);
+ buffer[i] = 0;
} else {
int x1, x2, y1, y2, distx, idistx, disty, idisty, x_off;
FbBits *b;
@@ -3219,7 +3214,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
ft = FbGet8(tl,24) * idistx + FbGet8(tr,24) * distx;
fb = FbGet8(bl,24) * idistx + FbGet8(br,24) * distx;
r |= (((ft * idisty + fb * disty) << 8) & 0xff000000);
- WRITE(buffer + i, r);
+ buffer[i] = r;
}
v.vector[0] += unit.vector[0];
v.vector[1] += unit.vector[1];
@@ -3228,7 +3223,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
} else {
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
- WRITE(buffer + i, 0);
+ buffer[i] = 0;
} else {
int x1, x2, y1, y2, distx, idistx, disty, idisty, x_off;
FbBits *b;
@@ -3280,7 +3275,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
ft = FbGet8(tl,24) * idistx + FbGet8(tr,24) * distx;
fb = FbGet8(bl,24) * idistx + FbGet8(br,24) * distx;
r |= (((ft * idisty + fb * disty) << 8) & 0xff000000);
- WRITE(buffer + i, r);
+ buffer[i] = r;
}
v.vector[0] += unit.vector[0];
v.vector[1] += unit.vector[1];
@@ -3297,7 +3292,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
params += 2;
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
- WRITE(buffer + i, 0);
+ buffer[i] = 0;
} else {
int x1, x2, y1, y2, x, y;
INT32 srtot, sgtot, sbtot, satot;
@@ -3347,18 +3342,16 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
if (sgtot < 0) sgtot = 0; else if (sgtot > 0xff) sgtot = 0xff;
if (sbtot < 0) sbtot = 0; else if (sbtot > 0xff) sbtot = 0xff;
- WRITE(buffer + i, ((satot << 24) |
- (srtot << 16) |
- (sgtot << 8) |
- (sbtot )));
+ buffer[i] = ((satot << 24) |
+ (srtot << 16) |
+ (sgtot << 8) |
+ (sbtot ));
}
v.vector[0] += unit.vector[0];
v.vector[1] += unit.vector[1];
v.vector[2] += unit.vector[2];
}
}
-
- fbFinishAccess (pict->pDrawable);
}
@@ -3379,10 +3372,10 @@ static void fbFetchExternalAlpha(PicturePtr pict, int x, int y, int width, CARD3
fbFetchTransformed(pict->alphaMap, x - pict->alphaOrigin.x, y - pict->alphaOrigin.y, width, alpha_buffer);
for (i = 0; i < width; ++i) {
int a = alpha_buffer[i]>>24;
- WRITE(buffer + i, (a << 24)
- | (div_255(Red(READ(buffer + i)) * a) << 16)
- | (div_255(Green(READ(buffer + i)) * a) << 8)
- | (div_255(Blue(READ(buffer + i)) * a)));
+ buffer[i] = (a << 24)
+ | (div_255(Red(buffer[i]) * a) << 16)
+ | (div_255(Green(buffer[i]) * a) << 8)
+ | (div_255(Blue(buffer[i]) * a));
}
if (alpha_buffer != _alpha_buffer)
@@ -3404,7 +3397,6 @@ static void fbStore(PicturePtr pict, int x, int y, int width, CARD32 *buffer)
bits += y*stride;
store(bits, buffer, x, width, indexed);
- fbFinishAccess (pict->pDrawable);
}
static void fbStoreExternalAlpha(PicturePtr pict, int x, int y, int width, CARD32 *buffer)
@@ -3444,9 +3436,6 @@ static void fbStoreExternalAlpha(PicturePtr pict, int x, int y, int width, CARD3
store(bits, buffer, x, width, indexed);
astore(alpha_bits, buffer, ax - pict->alphaOrigin.x, width, aindexed);
-
- fbFinishAccess (pict->alphaMap->pDrawable);
- fbFinishAccess (pict->pDrawable);
}
typedef void (*scanStoreProc)(PicturePtr , int , int , int , CARD32 *);
diff --git a/fb/fbcopy.c b/fb/fbcopy.c
index 164cd3d67..0d1cb7faf 100644
--- a/fb/fbcopy.c
+++ b/fb/fbcopy.c
@@ -103,8 +103,6 @@ fbCopyNtoN (DrawablePtr pSrcDrawable,
#endif
pbox++;
}
- fbFinishAccess (pDstDrawable);
- fbFinishAccess (pSrcDrawable);
}
void
@@ -175,9 +173,6 @@ fbCopy1toN (DrawablePtr pSrcDrawable,
}
pbox++;
}
-
- fbFinishAccess (pDstDrawable);
- fbFinishAccess (pSrcDrawable);
}
void
@@ -226,8 +221,6 @@ fbCopyNto1 (DrawablePtr pSrcDrawable,
(FbStip) pPriv->and, (FbStip) pPriv->xor,
(FbStip) pPriv->bgand, (FbStip) pPriv->bgxor,
bitplane);
- fbFinishAccess (pDstDrawable);
- fbFinishAccess (pSrcDrawable);
}
else
{
@@ -288,9 +281,6 @@ fbCopyNto1 (DrawablePtr pSrcDrawable,
pPriv->and, pPriv->xor,
pPriv->bgand, pPriv->bgxor);
xfree (tmp);
-
- fbFinishAccess (pDstDrawable);
- fbFinishAccess (pSrcDrawable);
}
pbox++;
}
diff --git a/fb/fbedge.c b/fb/fbedge.c
index 70fc423bd..b6ca829a4 100644
--- a/fb/fbedge.c
+++ b/fb/fbedge.c
@@ -60,9 +60,9 @@
#define StepAlpha ((__ap += __ao), (__ao ^= 1))
#define AddAlpha(a) { \
- CARD8 __o = READ(__ap); \
+ CARD8 __o = *__ap; \
CARD8 __a = (a) + Get4(__o, __ao); \
- WRITE(__ap, Put4 (__o, __ao, __a | (0 - ((__a) >> 4)))); \
+ *__ap = Put4 (__o, __ao, __a | (0 - ((__a) >> 4))); \
}
#include "fbedgeimp.h"
@@ -102,7 +102,7 @@ add_saturate_8 (CARD8 *buf, int value, int length)
{
while (length--)
{
- WRITE(buf, clip255 (READ(buf) + value));
+ *buf = clip255 (*buf + value);
buf++;
}
}
@@ -164,11 +164,11 @@ fbRasterizeEdges8 (FbBits *buf,
/* Add coverage across row */
if (lxi == rxi)
{
- WRITE(ap +lxi, clip255 (READ(ap + lxi) + rxs - lxs));
+ ap[lxi] = clip255 (ap[lxi] + rxs - lxs);
}
else
{
- WRITE(ap + lxi, clip255 (READ(ap + lxi) + N_X_FRAC(8) - lxs));
+ ap[lxi] = clip255 (ap[lxi] + N_X_FRAC(8) - lxs);
/* Move forward so that lxi/rxi is the pixel span */
lxi++;
@@ -238,7 +238,7 @@ fbRasterizeEdges8 (FbBits *buf,
* necessary to avoid a buffer overrun, (when rx
* is exactly on a pixel boundary). */
if (rxs)
- WRITE(ap + rxi, clip255 (READ(ap + rxi) + rxs));
+ ap[rxi] = clip255 (ap[rxi] + rxs);
}
}
@@ -247,7 +247,7 @@ fbRasterizeEdges8 (FbBits *buf,
if (fill_start != fill_end) {
if (fill_size == N_Y_FRAC(8))
{
- MEMSET_WRAPPED (ap + fill_start, 0xff, fill_end - fill_start);
+ memset (ap + fill_start, 0xff, fill_end - fill_start);
}
else
{
@@ -273,7 +273,7 @@ fbRasterizeEdges8 (FbBits *buf,
{
if (fill_size == N_Y_FRAC(8))
{
- MEMSET_WRAPPED (ap + fill_start, 0xff, fill_end - fill_start);
+ memset (ap + fill_start, 0xff, fill_end - fill_start);
}
else
{
diff --git a/fb/fbedgeimp.h b/fb/fbedgeimp.h
index 57da31a39..877393516 100644
--- a/fb/fbedgeimp.h
+++ b/fb/fbedgeimp.h
@@ -76,14 +76,12 @@ rasterizeEdges (FbBits *buf,
x &= FB_MASK;
FbMaskBits (x, width, startmask, nmiddle, endmask);
- if (startmask) {
- WRITE(a, READ(a) | startmask);
- a++;
- }
+ if (startmask)
+ *a++ |= startmask;
while (nmiddle--)
- WRITE(a++, FB_ALLONES);
+ *a++ = FB_ALLONES;
if (endmask)
- WRITE(a, READ(a) | endmask);
+ *a |= endmask;
}
#else
{
diff --git a/fb/fbfill.c b/fb/fbfill.c
index 7ef3a70f9..ad5025c84 100644
--- a/fb/fbfill.c
+++ b/fb/fbfill.c
@@ -49,10 +49,8 @@ fbFill (DrawablePtr pDrawable,
case FillSolid:
#ifdef USE_MMX
if (!pPriv->and && fbHaveMMX())
- if (fbSolidFillmmx (pDrawable, x, y, width, height, pPriv->xor)) {
- fbFinishAccess (pDrawable);
+ if (fbSolidFillmmx (pDrawable, x, y, width, height, pPriv->xor))
return;
- }
#endif
fbSolid (dst + (y + dstYoff) * dstStride,
dstStride,
@@ -94,7 +92,6 @@ fbFill (DrawablePtr pDrawable,
(pGC->patOrg.x + pDrawable->x + dstXoff),
pGC->patOrg.y + pDrawable->y - y);
- fbFinishAccess (&pStip->drawable);
}
else
{
@@ -132,7 +129,6 @@ fbFill (DrawablePtr pDrawable,
bgand, bgxor,
pGC->patOrg.x + pDrawable->x + dstXoff,
pGC->patOrg.y + pDrawable->y - y);
- fbFinishAccess (&pStip->drawable);
}
break;
}
@@ -161,12 +157,10 @@ fbFill (DrawablePtr pDrawable,
dstBpp,
(pGC->patOrg.x + pDrawable->x + dstXoff) * dstBpp,
pGC->patOrg.y + pDrawable->y - y);
- fbFinishAccess (&pTile->drawable);
break;
}
}
fbValidateDrawable (pDrawable);
- fbFinishAccess (pDrawable);
}
void
@@ -221,10 +215,8 @@ fbSolidBoxClipped (DrawablePtr pDrawable,
if (fbSolidFillmmx (pDrawable,
partX1, partY1,
(partX2 - partX1), (partY2 - partY1),
- xor)) {
- fbFinishAccess (pDrawable);
+ xor))
return;
- }
}
#endif
fbSolid (dst + (partY1 + dstYoff) * dstStride,
@@ -236,5 +228,4 @@ fbSolidBoxClipped (DrawablePtr pDrawable,
(partY2 - partY1),
and, xor);
}
- fbFinishAccess (pDrawable);
}
diff --git a/fb/fbgc.c b/fb/fbgc.c
index 3f8bf25e7..5b5581093 100644
--- a/fb/fbgc.c
+++ b/fb/fbgc.c
@@ -106,18 +106,16 @@ fbPadPixmap (PixmapPtr pPixmap)
mask = FbBitsMask (0, width);
while (height--)
{
- b = READ(bits) & mask;
+ b = *bits & mask;
w = width;
while (w < FB_UNIT)
{
b = b | FbScrRight(b, w);
w <<= 1;
}
- WRITE(bits, b);
+ *bits = b;
bits += stride;
}
-
- fbFinishAccess (&pPixmap->drawable);
}
/*
@@ -155,7 +153,7 @@ fbLineRepeat (FbBits *bits, int len, int width)
width = (width + FB_UNIT-1) >> FB_SHIFT;
bits++;
while (--width)
- if (READ(bits) != first)
+ if (*bits != first)
return FALSE;
return TRUE;
}
@@ -185,13 +183,10 @@ fbCanEvenStipple (PixmapPtr pStipple, int bpp)
/* check to see that the stipple repeats horizontally */
while (h--)
{
- if (!fbLineRepeat (bits, len, pStipple->drawable.width)) {
- fbFinishAccess (&pStipple->drawable);
+ if (!fbLineRepeat (bits, len, pStipple->drawable.width))
return FALSE;
- }
bits += stride;
}
- fbFinishAccess (&pStipple->drawable);
return TRUE;
}
diff --git a/fb/fbgetsp.c b/fb/fbgetsp.c
index ffd8a1d7d..f77ea8c52 100644
--- a/fb/fbgetsp.c
+++ b/fb/fbgetsp.c
@@ -84,6 +84,4 @@ fbGetSpans(DrawablePtr pDrawable,
ppt++;
pwidth++;
}
-
- fbFinishAccess (pDrawable);
}
diff --git a/fb/fbglyph.c b/fb/fbglyph.c
index 2c19b742f..8e819401b 100644
--- a/fb/fbglyph.c
+++ b/fb/fbglyph.c
@@ -62,11 +62,11 @@ fbGlyphIn (RegionPtr pRegion,
#ifdef FB_24BIT
#ifndef FBNOPIXADDR
-#define WRITE1(d,n,fg) WRITE((d) + (n), (CARD8) fg)
-#define WRITE2(d,n,fg) WRITE((CARD16 *) &(d[n]), (CARD16) fg)
-#define WRITE4(d,n,fg) WRITE((CARD32 *) &(d[n]), (CARD32) fg)
+#define WRITE1(d,n,fg) ((d)[n] = (CARD8) fg)
+#define WRITE2(d,n,fg) (*(CARD16 *) &(d[n]) = (CARD16) fg)
+#define WRITE4(d,n,fg) (*(CARD32 *) &(d[n]) = (CARD32) fg)
#if FB_UNIT == 6 && IMAGE_BYTE_ORDER == LSBFirst
-#define WRITE8(d) WRITE((FbBits *) &(d[0]), fg)
+#define WRITE8(d) (*(FbBits *) &(d[0]) = fg)
#else
#define WRITE8(d) WRITE4(d,0,_ABCA), WRITE4(d,4,_BCAB)
#endif
@@ -157,7 +157,7 @@ fbGlyph24 (FbBits *dstBits,
lshift = 4 - shift;
while (height--)
{
- bits = READ(stipple++);
+ bits = *stipple++;
n = lshift;
dst = dstLine;
while (bits)
@@ -284,7 +284,7 @@ fbPolyGlyphBlt (DrawablePtr pDrawable,
glyph = 0;
if (pGC->fillStyle == FillSolid && pPriv->and == 0)
{
- dstBpp = pDrawable->bitsPerPixel;
+ fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
switch (dstBpp) {
case 8: glyph = fbGlyph8; break;
case 16: glyph = fbGlyph16; break;
@@ -312,7 +312,6 @@ fbPolyGlyphBlt (DrawablePtr pDrawable,
if (glyph && gWidth <= sizeof (FbStip) * 8 &&
fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight))
{
- fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
(*glyph) (dst + (gy + dstYoff) * dstStride,
dstStride,
dstBpp,
@@ -320,7 +319,6 @@ fbPolyGlyphBlt (DrawablePtr pDrawable,
pPriv->xor,
gx + dstXoff,
gHeight);
- fbFinishAccess (pDrawable);
}
else
#endif
@@ -377,7 +375,7 @@ fbImageGlyphBlt (DrawablePtr pDrawable,
glyph = 0;
if (pPriv->and == 0)
{
- dstBpp = pDrawable->bitsPerPixel;
+ fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
switch (dstBpp) {
case 8: glyph = fbGlyph8; break;
case 16: glyph = fbGlyph16; break;
@@ -445,7 +443,6 @@ fbImageGlyphBlt (DrawablePtr pDrawable,
if (glyph && gWidth <= sizeof (FbStip) * 8 &&
fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight))
{
- fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
(*glyph) (dst + (gy + dstYoff) * dstStride,
dstStride,
dstBpp,
@@ -453,7 +450,6 @@ fbImageGlyphBlt (DrawablePtr pDrawable,
pPriv->fg,
gx + dstXoff,
gHeight);
- fbFinishAccess (pDrawable);
}
else
#endif
diff --git a/fb/fbimage.c b/fb/fbimage.c
index 06a3c84fe..3b4a07c3d 100644
--- a/fb/fbimage.c
+++ b/fb/fbimage.c
@@ -170,8 +170,6 @@ fbPutZImage (DrawablePtr pDrawable,
pm,
dstBpp);
}
-
- fbFinishAccess (pDrawable);
}
void
@@ -279,8 +277,6 @@ fbPutXYImage (DrawablePtr pDrawable,
fgand, fgxor, bgand, bgxor);
}
}
-
- fbFinishAccess (pDrawable);
}
void
@@ -365,6 +361,4 @@ fbGetImage (DrawablePtr pDrawable,
fbXorStip(GXcopy,0,FB_STIP_ALLONES),
planeMask);
}
-
- fbFinishAccess (pDrawable);
}
diff --git a/fb/fbpict.c b/fb/fbpict.c
index eb305b906..c208643dd 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -137,25 +137,22 @@ fbCompositeSolidMask_nx8x8888 (CARD8 op,
while (w--)
{
- m = READ(mask++);
+ m = *mask++;
if (m == 0xff)
{
if (srca == 0xff)
- WRITE(dst, src & dstMask);
+ *dst = src & dstMask;
else
- WRITE(dst, fbOver (src, READ(dst)) & dstMask);
+ *dst = fbOver (src, *dst) & dstMask;
}
else if (m)
{
d = fbIn (src, m);
- WRITE(dst, fbOver (d, READ(dst)) & dstMask);
+ *dst = fbOver (d, *dst) & dstMask;
}
dst++;
}
}
-
- fbFinishAccess (pMask->pDrawable);
- fbFinishAccess (pDst->pDrawable);
}
void
@@ -199,17 +196,17 @@ fbCompositeSolidMask_nx8888x8888C (CARD8 op,
while (w--)
{
- ma = READ(mask++);
+ ma = *mask++;
if (ma == 0xffffffff)
{
if (srca == 0xff)
- WRITE(dst, src & dstMask);
+ *dst = src & dstMask;
else
- WRITE(dst, fbOver (src, READ(dst)) & dstMask);
+ *dst = fbOver (src, *dst) & dstMask;
}
else if (ma)
{
- d = READ(dst);
+ d = *dst;
#define FbInOverC(src,srca,msk,dst,i,result) { \
CARD16 __a = FbGet8(msk,i); \
CARD32 __t, __ta; \
@@ -224,14 +221,11 @@ fbCompositeSolidMask_nx8888x8888C (CARD8 op,
FbInOverC (src, srca, ma, d, 8, n);
FbInOverC (src, srca, ma, d, 16, o);
FbInOverC (src, srca, ma, d, 24, p);
- WRITE(dst, m|n|o|p);
+ *dst = m|n|o|p;
}
dst++;
}
}
-
- fbFinishAccess (pMask->pDrawable);
- fbFinishAccess (pDst->pDrawable);
}
void
@@ -274,7 +268,7 @@ fbCompositeSolidMask_nx8x0888 (CARD8 op,
while (w--)
{
- m = READ(mask++);
+ m = *mask++;
if (m == 0xff)
{
if (srca == 0xff)
@@ -294,9 +288,6 @@ fbCompositeSolidMask_nx8x0888 (CARD8 op,
dst += 3;
}
}
-
- fbFinishAccess (pMask->pDrawable);
- fbFinishAccess (pDst->pDrawable);
}
void
@@ -339,30 +330,27 @@ fbCompositeSolidMask_nx8x0565 (CARD8 op,
while (w--)
{
- m = READ(mask++);
+ m = *mask++;
if (m == 0xff)
{
if (srca == 0xff)
d = src;
else
{
- d = READ(dst);
+ d = *dst;
d = fbOver24 (src, cvt0565to8888(d));
}
- WRITE(dst, cvt8888to0565(d));
+ *dst = cvt8888to0565(d);
}
else if (m)
{
- d = READ(dst);
+ d = *dst;
d = fbOver24 (fbIn(src,m), cvt0565to8888(d));
- WRITE(dst, cvt8888to0565(d));
+ *dst = cvt8888to0565(d);
}
dst++;
}
}
-
- fbFinishAccess (pMask->pDrawable);
- fbFinishAccess (pDst->pDrawable);
}
void
@@ -409,36 +397,33 @@ fbCompositeSolidMask_nx8888x0565C (CARD8 op,
while (w--)
{
- ma = READ(mask++);
+ ma = *mask++;
if (ma == 0xffffffff)
{
if (srca == 0xff)
{
- WRITE(dst, src16);
+ *dst = src16;
}
else
{
- d = READ(dst);
+ d = *dst;
d = fbOver24 (src, cvt0565to8888(d));
- WRITE(dst, cvt8888to0565(d));
+ *dst = cvt8888to0565(d);
}
}
else if (ma)
{
- d = READ(dst);
+ d = *dst;
d = cvt0565to8888(d);
FbInOverC (src, srca, ma, d, 0, m);
FbInOverC (src, srca, ma, d, 8, n);
FbInOverC (src, srca, ma, d, 16, o);
d = m|n|o;
- WRITE(dst, cvt8888to0565(d));
+ *dst = cvt8888to0565(d);
}
dst++;
}
}
-
- fbFinishAccess (pMask->pDrawable);
- fbFinishAccess (pDst->pDrawable);
}
void
@@ -476,18 +461,15 @@ fbCompositeSrc_8888x8888 (CARD8 op,
while (w--)
{
- s = READ(src++);
+ s = *src++;
a = s >> 24;
if (a == 0xff)
- WRITE(dst, s & dstMask);
+ *dst = s & dstMask;
else if (a)
- WRITE(dst, fbOver (s, READ(dst)) & dstMask);
+ *dst = fbOver (s, *dst) & dstMask;
dst++;
}
}
-
- fbFinishAccess (pSrc->pDrawable);
- fbFinishAccess (pDst->pDrawable);
}
void
@@ -524,7 +506,7 @@ fbCompositeSrc_8888x0888 (CARD8 op,
while (w--)
{
- s = READ(src++);
+ s = *src++;
a = s >> 24;
if (a)
{
@@ -537,9 +519,6 @@ fbCompositeSrc_8888x0888 (CARD8 op,
dst += 3;
}
}
-
- fbFinishAccess (pSrc->pDrawable);
- fbFinishAccess (pDst->pDrawable);
}
void
@@ -576,7 +555,7 @@ fbCompositeSrc_8888x0565 (CARD8 op,
while (w--)
{
- s = READ(src++);
+ s = *src++;
a = s >> 24;
if (a)
{
@@ -584,17 +563,14 @@ fbCompositeSrc_8888x0565 (CARD8 op,
d = s;
else
{
- d = READ(dst);
+ d = *dst;
d = fbOver24 (s, cvt0565to8888(d));
}
- WRITE(dst, cvt8888to0565(d));
+ *dst = cvt8888to0565(d);
}
dst++;
}
}
-
- fbFinishAccess (pDst->pDrawable);
- fbFinishAccess (pSrc->pDrawable);
}
void
@@ -629,11 +605,8 @@ fbCompositeSrc_0565x0565 (CARD8 op,
w = width;
while (w--)
- WRITE(dst, READ(src++));
+ *dst++ = *src++;
}
-
- fbFinishAccess (pDst->pDrawable);
- fbFinishAccess (pSrc->pDrawable);
}
void
@@ -670,23 +643,20 @@ fbCompositeSrcAdd_8000x8000 (CARD8 op,
while (w--)
{
- s = READ(src++);
+ s = *src++;
if (s)
{
if (s != 0xff)
{
- d = READ(dst);
+ d = *dst;
t = d + s;
s = t | (0 - (t >> 8));
}
- WRITE(dst, s);
+ *dst = s;
}
dst++;
}
}
-
- fbFinishAccess (pDst->pDrawable);
- fbFinishAccess (pSrc->pDrawable);
}
void
@@ -724,12 +694,12 @@ fbCompositeSrcAdd_8888x8888 (CARD8 op,
while (w--)
{
- s = READ(src++);
+ s = *src++;
if (s)
{
if (s != 0xffffffff)
{
- d = READ(dst);
+ d = *dst;
if (d)
{
m = FbAdd(s,d,0,t);
@@ -739,14 +709,11 @@ fbCompositeSrcAdd_8888x8888 (CARD8 op,
s = m|n|o|p;
}
}
- WRITE(dst, s);
+ *dst = s;
}
dst++;
}
}
-
- fbFinishAccess (pDst->pDrawable);
- fbFinishAccess (pSrc->pDrawable);
}
void
@@ -790,9 +757,6 @@ fbCompositeSrcAdd_1000x1000 (CARD8 op,
FALSE,
FALSE);
-
- fbFinishAccess(pDst->pDrawable);
- fbFinishAccess(pSrc->pDrawable);
}
void
@@ -857,9 +821,6 @@ fbCompositeSolidMask_nx1xn (CARD8 op,
src,
FB_ALLONES,
0x0);
-
- fbFinishAccess (pDst->pDrawable);
- fbFinishAccess (pMask->pDrawable);
}
# define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b))
diff --git a/fb/fbpict.h b/fb/fbpict.h
index 19d555781..4ad032471 100644
--- a/fb/fbpict.h
+++ b/fb/fbpict.h
@@ -76,13 +76,13 @@
fbGetDrawable((pict)->pDrawable,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \
switch (__bpp__) { \
case 32: \
- (bits) = READ((CARD32 *) __bits__); \
+ (bits) = *(CARD32 *) __bits__; \
break; \
case 24: \
(bits) = Fetch24 ((CARD8 *) __bits__); \
break; \
case 16: \
- (bits) = READ((CARD16 *) __bits__); \
+ (bits) = *(CARD16 *) __bits__; \
(bits) = cvt0565to8888(bits); \
break; \
default: \
@@ -99,7 +99,6 @@
/* manage missing src alpha */ \
if ((pict)->pFormat->direct.alphaMask == 0) \
(bits) |= 0xff000000; \
- fbFinishAccess ((pict)->pDrawable); \
}
#define fbComposeGetStart(pict,x,y,type,stride,line,mul) {\
@@ -121,22 +120,22 @@
#if IMAGE_BYTE_ORDER == MSBFirst
#define Fetch24(a) ((unsigned long) (a) & 1 ? \
- ((READ(a) << 16) | READ((CARD16 *) ((a)+1))) : \
- ((READ((CARD16 *) (a)) << 8) | READ((a)+2)))
+ ((*(a) << 16) | *((CARD16 *) ((a)+1))) : \
+ ((*((CARD16 *) (a)) << 8) | *((a)+2)))
#define Store24(a,v) ((unsigned long) (a) & 1 ? \
- (WRITE(a, (CARD8) ((v) >> 16)), \
- WRITE((CARD16 *) ((a)+1), (CARD16) (v))) : \
- (WRITE((CARD16 *) (a), (CARD16) ((v) >> 8)), \
- WRITE((a)+2, (CARD8) (v))))
+ ((*(a) = (CARD8) ((v) >> 16)), \
+ (*((CARD16 *) ((a)+1)) = (CARD16) (v))) : \
+ ((*((CARD16 *) (a)) = (CARD16) ((v) >> 8)), \
+ (*((a)+2) = (CARD8) (v))))
#else
#define Fetch24(a) ((unsigned long) (a) & 1 ? \
- (READ(a) | (READ((CARD16 *) ((a)+1)) << 8)) : \
- (READ((CARD16 *) (a)) | (READ((a)+2) << 16)))
+ ((*(a)) | (*((CARD16 *) ((a)+1)) << 8)) : \
+ ((*((CARD16 *) (a))) | (*((a)+2) << 16)))
#define Store24(a,v) ((unsigned long) (a) & 1 ? \
- (WRITE(a, (CARD8) (v)), \
- WRITE((CARD16 *) ((a)+1), (CARD16) ((v) >> 8))) : \
- (WRITE((CARD16 *) (a), (CARD16) (v)),\
- WRITE((a)+2, (CARD8) ((v) >> 16))))
+ ((*(a) = (CARD8) (v)), \
+ (*((CARD16 *) ((a)+1)) = (CARD16) ((v) >> 8))) : \
+ ((*((CARD16 *) (a)) = (CARD16) (v)),\
+ (*((a)+2) = (CARD8) ((v) >> 16))))
#endif
/*
diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c
index c2ddcb0e9..f79f7010d 100644
--- a/fb/fbpixmap.c
+++ b/fb/fbpixmap.c
@@ -160,8 +160,6 @@ fbPixmapToRegion(PixmapPtr pPix)
FirstRect = REGION_BOXPTR(pReg);
rects = FirstRect;
- fbPrepareAccess(&pPix->drawable);
-
pwLine = (FbBits *) pPix->devPrivate.ptr;
nWidth = pPix->devKind >> (FB_SHIFT-3);
@@ -176,7 +174,7 @@ fbPixmapToRegion(PixmapPtr pPix)
irectLineStart = rects - FirstRect;
/* If the Screen left most bit of the word is set, we're starting in
* a box */
- if(READ(pw) & mask0)
+ if(*pw & mask0)
{
fInBox = TRUE;
rx1 = 0;
@@ -187,7 +185,7 @@ fbPixmapToRegion(PixmapPtr pPix)
pwLineEnd = pw + (width >> FB_SHIFT);
for (base = 0; pw < pwLineEnd; base += FB_UNIT)
{
- w = READ(pw++);
+ w = *pw++;
if (fInBox)
{
if (!~w)
@@ -228,7 +226,7 @@ fbPixmapToRegion(PixmapPtr pPix)
if(width & FB_MASK)
{
/* Process final partial word on line */
- w = READ(pw++);
+ w = *pw++;
for(ib = 0; ib < (width & FB_MASK); ib++)
{
/* If the Screen left most bit of the word is set, we're
@@ -313,8 +311,6 @@ fbPixmapToRegion(PixmapPtr pPix)
pReg->data = (RegDataPtr)NULL;
}
}
-
- fbFinishAccess(&pPix->drawable);
#ifdef DEBUG
if (!miValidRegion(pReg))
FatalError("Assertion failed file %s, line %d: expr\n", __FILE__, __LINE__);
@@ -366,7 +362,6 @@ fbValidateDrawable (DrawablePtr pDrawable)
if (!fbValidateBits (first, stride, FB_HEAD_BITS) ||
!fbValidateBits (last, stride, FB_TAIL_BITS))
fbInitializeDrawable(pDrawable);
- fbFinishAccess (pDrawable);
}
void
@@ -388,6 +383,5 @@ fbInitializeDrawable (DrawablePtr pDrawable)
last = bits + stride * pDrawable->height;
fbSetBits (first, stride, FB_HEAD_BITS);
fbSetBits (last, stride, FB_TAIL_BITS);
- fbFinishAccess (pDrawable);
}
#endif /* FB_DEBUG */
diff --git a/fb/fbpoint.c b/fb/fbpoint.c
index c03ea18cc..7154b53a1 100644
--- a/fb/fbpoint.c
+++ b/fb/fbpoint.c
@@ -90,20 +90,20 @@ fbDots (FbBits *dstOrig,
FbMaskStip (x, 24, leftMask, n, rightMask);
if (leftMask)
{
- WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask));
+ *d = FbDoMaskRRop (*d, andT, xorT, leftMask);
andT = FbNext24Stip(andT);
xorT = FbNext24Stip(xorT);
d++;
}
if (rightMask)
- WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, rightMask));
+ *d = FbDoMaskRRop(*d, andT, xorT, rightMask);
}
else
#endif
{
FbStip mask;
mask = FbStipMask(x, dstBpp);
- WRITE(d, FbDoMaskRRop (READ(d), and, xor, mask));
+ *d = FbDoMaskRRop (*d, and, xor, mask);
}
}
}
@@ -160,5 +160,4 @@ fbPolyPoint (DrawablePtr pDrawable,
nBox--; pBox++)
(*dots) (dst, dstStride, dstBpp, pBox, pptInit, nptInit,
pDrawable->x, pDrawable->y, dstXoff, dstYoff, and, xor);
- fbFinishAccess (pDrawable);
}
diff --git a/fb/fbpseudocolor.c b/fb/fbpseudocolor.c
index 271e98145..2233f95dc 100644
--- a/fb/fbpseudocolor.c
+++ b/fb/fbpseudocolor.c
@@ -875,8 +875,6 @@ xxCopyPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg,
register CARD16 *d;
int w;
- fbPrepareAccess((DrawablePtr)pScreen->devPrivate);
-
dst_base = (CARD16*) ((PixmapPtr)pScreen->devPrivate)->devPrivate.ptr;
dst_stride = (int)((PixmapPtr)pScreen->devPrivate)->devKind
/ sizeof (CARD16);
@@ -901,8 +899,6 @@ xxCopyPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg,
}
pbox++;
}
-
- fbFinishAccess(&((PixmapPtr)pScreen->devPrivate)->drawable);
}
static void
@@ -1204,7 +1200,7 @@ GCFuncs xxGCFuncs = {
xxChangeClip, xxDestroyClip, xxCopyClip
};
-static GCOps xxGCOps = {
+GCOps xxGCOps = {
xxFillSpans, xxSetSpans,
xxPutImage, xxCopyArea,
xxCopyPlane, xxPolyPoint,
diff --git a/fb/fbpush.c b/fb/fbpush.c
index bb7bcefef..0632766d0 100644
--- a/fb/fbpush.c
+++ b/fb/fbpush.c
@@ -58,7 +58,7 @@ fbPushPattern (DrawablePtr pDrawable,
w = width;
s = src;
src += srcStride;
- bits = READ(s++);
+ bits = *s++;
xspan = x;
while (w)
{
@@ -73,7 +73,7 @@ fbPushPattern (DrawablePtr pDrawable,
bitsMask = FbStipRight (bitsMask, 1);
if (!bitsMask)
{
- bits = READ(s++);
+ bits = *s++;
bitsMask = FbBitsMask(0,1);
}
} while (bits & bitsMask);
@@ -92,7 +92,7 @@ fbPushPattern (DrawablePtr pDrawable,
bitsMask = FbStipRight (bitsMask, 1);
if (!bitsMask)
{
- bits = READ(s++);
+ bits = *s++;
bitsMask = FbBitsMask(0,1);
}
} while (!(bits & bitsMask));
@@ -165,7 +165,6 @@ fbPushFill (DrawablePtr pDrawable,
fbAnd(GXnoop,(FbBits) 0,FB_ALLONES),
fbXor(GXnoop,(FbBits) 0,FB_ALLONES));
}
- fbFinishAccess (pDrawable);
}
else
{
diff --git a/fb/fbscreen.c b/fb/fbscreen.c
index 045ca8fd2..b88375810 100644
--- a/fb/fbscreen.c
+++ b/fb/fbscreen.c
@@ -155,19 +155,6 @@ fbSetupScreen(ScreenPtr pScreen,
return TRUE;
}
-#ifdef FB_ACCESS_WRAPPER
-Bool
-wfbFinishScreenInit(ScreenPtr pScreen,
- pointer pbits,
- int xsize,
- int ysize,
- int dpix,
- int dpiy,
- int width,
- int bpp,
- SetupWrapProcPtr setupWrap,
- FinishWrapProcPtr finishWrap)
-#else
Bool
fbFinishScreenInit(ScreenPtr pScreen,
pointer pbits,
@@ -177,7 +164,6 @@ fbFinishScreenInit(ScreenPtr pScreen,
int dpiy,
int width,
int bpp)
-#endif
{
VisualPtr visuals;
DepthPtr depths;
@@ -236,10 +222,6 @@ fbFinishScreenInit(ScreenPtr pScreen,
fbGetScreenPrivate(pScreen)->win32bpp = 32;
fbGetScreenPrivate(pScreen)->pix32bpp = 32;
}
-#ifdef FB_ACCESS_WRAPPER
- fbGetScreenPrivate(pScreen)->setupWrap = setupWrap;
- fbGetScreenPrivate(pScreen)->finishWrap = finishWrap;
-#endif
#endif
rootdepth = 0;
if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth,
@@ -274,27 +256,6 @@ fbFinishScreenInit(ScreenPtr pScreen,
}
/* dts * (inch/dot) * (25.4 mm / inch) = mm */
-#ifdef FB_ACCESS_WRAPPER
-Bool
-wfbScreenInit(ScreenPtr pScreen,
- pointer pbits,
- int xsize,
- int ysize,
- int dpix,
- int dpiy,
- int width,
- int bpp,
- SetupWrapProcPtr setupWrap,
- FinishWrapProcPtr finishWrap)
-{
- if (!fbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp))
- return FALSE;
- if (!wfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy,
- width, bpp, setupWrap, finishWrap))
- return FALSE;
- return TRUE;
-}
-#else
Bool
fbScreenInit(ScreenPtr pScreen,
pointer pbits,
@@ -312,7 +273,6 @@ fbScreenInit(ScreenPtr pScreen,
return FALSE;
return TRUE;
}
-#endif
#ifdef FB_OLD_SCREEN
diff --git a/fb/fbseg.c b/fb/fbseg.c
index 31076379b..d66e42468 100644
--- a/fb/fbseg.c
+++ b/fb/fbseg.c
@@ -79,7 +79,7 @@ fbBresSolid (DrawablePtr pDrawable,
mask = fbBresShiftMask(mask,signdx,dstBpp);
if (!mask)
{
- WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits));
+ *dst = FbDoMaskRRop (*dst, and, xor, bits);
bits = 0;
dst += signdx;
mask = mask0;
@@ -87,20 +87,20 @@ fbBresSolid (DrawablePtr pDrawable,
e += e1;
if (e >= 0)
{
- WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits));
+ *dst = FbDoMaskRRop (*dst, and, xor, bits);
bits = 0;
dst += dstStride;
e += e3;
}
}
if (bits)
- WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits));
+ *dst = FbDoMaskRRop (*dst, and, xor, bits);
}
else
{
while (len--)
{
- WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, mask));
+ *dst = FbDoMaskRRop (*dst, and, xor, mask);
dst += dstStride;
e += e1;
if (e >= 0)
@@ -115,8 +115,6 @@ fbBresSolid (DrawablePtr pDrawable,
}
}
}
-
- fbFinishAccess (pDrawable);
}
void
@@ -166,9 +164,9 @@ fbBresDash (DrawablePtr pDrawable,
while (len--)
{
if (even)
- WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, mask));
+ *dst = FbDoMaskRRop (*dst, and, xor, mask);
else if (doOdd)
- WRITE(dst, FbDoMaskRRop (READ(dst), bgand, bgxor, mask));
+ *dst = FbDoMaskRRop (*dst, bgand, bgxor, mask);
if (axis == X_AXIS)
{
mask = fbBresShiftMask(mask,signdx,dstBpp);
@@ -201,8 +199,6 @@ fbBresDash (DrawablePtr pDrawable,
}
FbDashStep (dashlen, even);
}
-
- fbFinishAccess (pDrawable);
}
void
@@ -375,13 +371,13 @@ fbBresSolid24RRop (DrawablePtr pDrawable,
FbMaskStip (x, 24, leftMask, nl, rightMask);
if (leftMask)
{
- WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask));
+ *d = FbDoMaskRRop (*d, andT, xorT, leftMask);
d++;
andT = FbNext24Stip (andT);
xorT = FbNext24Stip (xorT);
}
if (rightMask)
- WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, rightMask));
+ *d = FbDoMaskRRop (*d, andT, xorT, rightMask);
if (axis == X_AXIS)
{
x1 += signdx;
@@ -403,8 +399,6 @@ fbBresSolid24RRop (DrawablePtr pDrawable,
}
}
}
-
- fbFinishAccess (pDrawable);
}
static void
@@ -474,13 +468,13 @@ fbBresDash24RRop (DrawablePtr pDrawable,
FbMaskStip (x, 24, leftMask, nl, rightMask);
if (leftMask)
{
- WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask));
+ *d = FbDoMaskRRop (*d, andT, xorT, leftMask);
d++;
andT = FbNext24Stip (andT);
xorT = FbNext24Stip (xorT);
}
if (rightMask)
- WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, rightMask));
+ *d = FbDoMaskRRop (*d, andT, xorT, rightMask);
}
if (axis == X_AXIS)
{
@@ -504,8 +498,6 @@ fbBresDash24RRop (DrawablePtr pDrawable,
}
FbDashStep (dashlen, even);
}
-
- fbFinishAccess (pDrawable);
}
#endif
diff --git a/fb/fbsetsp.c b/fb/fbsetsp.c
index 06332568b..c59c13ceb 100644
--- a/fb/fbsetsp.c
+++ b/fb/fbsetsp.c
@@ -99,6 +99,5 @@ fbSetSpans (DrawablePtr pDrawable,
pwidth++;
}
fbValidateDrawable (pDrawable);
- fbFinishAccess (pDrawable);
}
diff --git a/fb/fbsolid.c b/fb/fbsolid.c
index 6b5ed0fa1..89effe63b 100644
--- a/fb/fbsolid.c
+++ b/fb/fbsolid.c
@@ -70,12 +70,12 @@ fbSolid (FbBits *dst,
n = nmiddle;
if (!and)
while (n--)
- WRITE(dst++, xor);
+ *dst++ = xor;
else
while (n--)
{
- WRITE(dst, FbDoRRop (READ(dst), and, xor));
- dst++;
+ *dst = FbDoRRop (*dst, and, xor);
+ dst++;
}
if (endmask)
FbDoRightMaskByteRRop(dst,endbyte,endmask,and,xor);
@@ -160,26 +160,26 @@ fbSolid24 (FbBits *dst,
{
if (startmask)
{
- WRITE(dst, FbDoMaskRRop(READ(dst), andS, xorS, startmask));
- dst++;
+ *dst = FbDoMaskRRop(*dst, andS, xorS, startmask);
+ dst++;
}
n = nmiddle;
if (!and0)
{
while (n >= 3)
{
- WRITE(dst++, xor0);
- WRITE(dst++, xor1);
- WRITE(dst++, xor2);
+ *dst++ = xor0;
+ *dst++ = xor1;
+ *dst++ = xor2;
n -= 3;
}
if (n)
{
- WRITE(dst++, xor0);
+ *dst++ = xor0;
n--;
if (n)
{
- WRITE(dst++, xor1);
+ *dst++ = xor1;
}
}
}
@@ -187,28 +187,28 @@ fbSolid24 (FbBits *dst,
{
while (n >= 3)
{
- WRITE(dst, FbDoRRop (READ(dst), and0, xor0));
- dst++;
- WRITE(dst, FbDoRRop (READ(dst), and1, xor1));
- dst++;
- WRITE(dst, FbDoRRop (READ(dst), and2, xor2));
- dst++;
+ *dst = FbDoRRop (*dst, and0, xor0);
+ dst++;
+ *dst = FbDoRRop (*dst, and1, xor1);
+ dst++;
+ *dst = FbDoRRop (*dst, and2, xor2);
+ dst++;
n -= 3;
}
if (n)
{
- WRITE(dst, FbDoRRop (READ(dst), and0, xor0));
- dst++;
+ *dst = FbDoRRop (*dst, and0, xor0);
+ dst++;
n--;
if (n)
{
- WRITE(dst, FbDoRRop (READ(dst), and1, xor1));
- dst++;
+ *dst = FbDoRRop (*dst, and1, xor1);
+ dst++;
}
}
}
if (endmask)
- WRITE(dst, FbDoMaskRRop (READ(dst), andE, xorE, endmask));
+ *dst = FbDoMaskRRop (*dst, andE, xorE, endmask);
dst += dstStride;
}
}
diff --git a/fb/fbstipple.c b/fb/fbstipple.c
index de8d1f814..ce971481e 100644
--- a/fb/fbstipple.c
+++ b/fb/fbstipple.c
@@ -155,7 +155,7 @@ fbEvenStipple (FbBits *dst,
/*
* Extract stipple bits for this scanline;
*/
- bits = READ(s);
+ bits = *s;
s += stipStride;
if (s == stipEnd)
s = stip;
@@ -199,12 +199,12 @@ fbEvenStipple (FbBits *dst,
n = nmiddle;
if (!and)
while (n--)
- WRITE(dst++, xor);
+ *dst++ = xor;
else
{
while (n--)
{
- WRITE(dst, FbDoRRop (READ(dst), and, xor));
+ *dst = FbDoRRop (*dst, and, xor);
dst++;
}
}
diff --git a/fb/fbtile.c b/fb/fbtile.c
index e7df1af5a..0d0cfe174 100644
--- a/fb/fbtile.c
+++ b/fb/fbtile.c
@@ -80,7 +80,7 @@ fbEvenTile (FbBits *dst,
/*
* Pick up bits for this scanline
*/
- bits = READ(t++);
+ bits = *t++;
if (t == tileEnd) t = tile;
bits = FbRotLeft(bits,rot);
and = fbAnd(alu,bits,pm);
@@ -94,11 +94,11 @@ fbEvenTile (FbBits *dst,
n = nmiddle;
if (!and)
while (n--)
- WRITE(dst++, xor);
+ *dst++ = xor;
else
while (n--)
{
- WRITE(dst, FbDoRRop (READ(dst), and, xor));
+ *dst = FbDoRRop (*dst, and, xor);
dst++;
}
if (endmask)
diff --git a/fb/fbtrap.c b/fb/fbtrap.c
index 4c67bcdfb..863969527 100644
--- a/fb/fbtrap.c
+++ b/fb/fbtrap.c
@@ -95,8 +95,6 @@ fbAddTraps (PicturePtr pPicture,
}
traps++;
}
-
- fbFinishAccess (pPicture->pDrawable);
}
void
@@ -144,8 +142,6 @@ fbRasterizeTrapezoid (PicturePtr pPicture,
fbRasterizeEdges (buf, bpp, width, stride, &l, &r, t, b);
}
-
- fbFinishAccess (pPicture->pDrawable);
}
static int
diff --git a/fb/fbwindow.c b/fb/fbwindow.c
index cac662cc7..968b5a61d 100644
--- a/fb/fbwindow.c
+++ b/fb/fbwindow.c
@@ -118,9 +118,6 @@ fbCopyWindowProc (DrawablePtr pSrcDrawable,
upsidedown);
pbox++;
}
-
- fbFinishAccess (pDstDrawable);
- fbFinishAccess (pSrcDrawable);
}
void
@@ -252,8 +249,6 @@ fbFillRegionSolid (DrawablePtr pDrawable,
fbValidateDrawable (pDrawable);
pbox++;
}
-
- fbFinishAccess (pDrawable);
}
#ifdef PANORAMIX
@@ -316,9 +311,6 @@ fbFillRegionTiled (DrawablePtr pDrawable,
yRot - (pbox->y1 + dstYoff));
pbox++;
}
-
- fbFinishAccess (&pTile->drawable);
- fbFinishAccess (pDrawable);
}
void
diff --git a/fb/wfbrename.h b/fb/wfbrename.h
deleted file mode 100644
index 8f875c88b..000000000
--- a/fb/wfbrename.h
+++ /dev/null
@@ -1,198 +0,0 @@
-#define fb16Lane wfb16Lane
-#define fb24_32CopyMtoN wfb24_32CopyMtoN
-#define fb24_32CreateScreenResources wfb24_32CreateScreenResources
-#define fb24_32GetImage wfb24_32GetImage
-#define fb24_32GetSpans wfb24_32GetSpans
-#define fb24_32ModifyPixmapHeader wfb24_32ModifyPixmapHeader
-#define fb24_32PutZImage wfb24_32PutZImage
-#define fb24_32ReformatTile wfb24_32ReformatTile
-#define fb24_32SetSpans wfb24_32SetSpans
-#define fb32Lane wfb32Lane
-#define fb8Lane wfb8Lane
-#define fbAddTraps wfbAddTraps
-#define fbAddTriangles wfbAddTriangles
-#define fbAllocatePrivates wfbAllocatePrivates
-#define fbArc16 wfbArc16
-#define fbArc24 wfbArc24
-#define fbArc32 wfbArc32
-#define fbArc8 wfbArc8
-#define fbBlt wfbBlt
-#define fbBlt24 wfbBlt24
-#define fbBltOne wfbBltOne
-#define fbBltOne24 wfbBltOne24
-#define fbBltPlane wfbBltPlane
-#define fbBltStip wfbBltStip
-#define fbBres wfbBres
-#define fbBresDash wfbBresDash
-#define fbBresDash16 wfbBresDash16
-#define fbBresDash24 wfbBresDash24
-#define fbBresDash32 wfbBresDash32
-#define fbBresDash8 wfbBresDash8
-#define fbBresFill wfbBresFill
-#define fbBresFillDash wfbBresFillDash
-#define fbBresSolid wfbBresSolid
-#define fbBresSolid16 wfbBresSolid16
-#define fbBresSolid24 wfbBresSolid24
-#define fbBresSolid32 wfbBresSolid32
-#define fbBresSolid8 wfbBresSolid8
-#define fbChangeWindowAttributes wfbChangeWindowAttributes
-#define fbClearVisualTypes wfbClearVisualTypes
-#define fbCloseScreen wfbCloseScreen
-#define fbComposite wfbComposite
-#define fbCompositeGeneral wfbCompositeGeneral
-#define fbCompositeSolidMask_nx1xn wfbCompositeSolidMask_nx1xn
-#define fbCompositeSolidMask_nx8888x0565C wfbCompositeSolidMask_nx8888x0565C
-#define fbCompositeSolidMask_nx8888x8888C wfbCompositeSolidMask_nx8888x8888C
-#define fbCompositeSolidMask_nx8x0565 wfbCompositeSolidMask_nx8x0565
-#define fbCompositeSolidMask_nx8x0888 wfbCompositeSolidMask_nx8x0888
-#define fbCompositeSolidMask_nx8x8888 wfbCompositeSolidMask_nx8x8888
-#define fbCompositeSrc_0565x0565 wfbCompositeSrc_0565x0565
-#define fbCompositeSrc_8888x0565 wfbCompositeSrc_8888x0565
-#define fbCompositeSrc_8888x0888 wfbCompositeSrc_8888x0888
-#define fbCompositeSrc_8888x8888 wfbCompositeSrc_8888x8888
-#define fbCompositeSrcAdd_1000x1000 wfbCompositeSrcAdd_1000x1000
-#define fbCompositeSrcAdd_8000x8000 wfbCompositeSrcAdd_8000x8000
-#define fbCompositeSrcAdd_8888x8888 wfbCompositeSrcAdd_8888x8888
-#define fbCopy1toN wfbCopy1toN
-#define fbCopyArea wfbCopyArea
-#define fbCopyNto1 wfbCopyNto1
-#define fbCopyNtoN wfbCopyNtoN
-#define fbCopyPlane wfbCopyPlane
-#define fbCopyRegion wfbCopyRegion
-#define fbCopyWindow wfbCopyWindow
-#define fbCopyWindowProc wfbCopyWindowProc
-#define fbCreateDefColormap wfbCreateDefColormap
-#define fbCreateGC wfbCreateGC
-#define fbCreatePixmap wfbCreatePixmap
-#define fbCreatePixmapBpp wfbCreatePixmapBpp
-#define fbCreateWindow wfbCreateWindow
-#define fbDestroyPixmap wfbDestroyPixmap
-#define fbDestroyWindow wfbDestroyWindow
-#define fbDoCopy wfbDoCopy
-#define fbDots wfbDots
-#define fbDots16 wfbDots16
-#define fbDots24 wfbDots24
-#define fbDots32 wfbDots32
-#define fbDots8 wfbDots8
-#define fbEvenStipple wfbEvenStipple
-#define fbEvenTile wfbEvenTile
-#define fbExpandDirectColors wfbExpandDirectColors
-#define fbFill wfbFill
-#define fbFillRegionSolid wfbFillRegionSolid
-#define fbFillRegionTiled wfbFillRegionTiled
-#define fbFillSpans wfbFillSpans
-#define fbFixCoordModePrevious wfbFixCoordModePrevious
-#define fbGCFuncs wfbGCFuncs
-#define fbGCOps wfbGCOps
-#define fbGCPrivateIndex wfbGCPrivateIndex
-#define fbGeneration wfbGeneration
-#define fbGetGCPrivateIndex wfbGetGCPrivateIndex
-#define fbGetImage wfbGetImage
-#define fbGetScreenPrivateIndex wfbGetScreenPrivateIndex
-#define fbGetSpans wfbGetSpans
-#define _fbGetWindowPixmap _wfbGetWindowPixmap
-#define fbGetWinPrivateIndex wfbGetWinPrivateIndex
-#define fbGlyph16 wfbGlyph16
-#define fbGlyph24 wfbGlyph24
-#define fbGlyph32 wfbGlyph32
-#define fbGlyph8 wfbGlyph8
-#define fbGlyphIn wfbGlyphIn
-#define fbHasVisualTypes wfbHasVisualTypes
-#define fbImageGlyphBlt wfbImageGlyphBlt
-#define fbIn wfbIn
-#define fbInitializeColormap wfbInitializeColormap
-#define fbInitVisuals wfbInitVisuals
-#define fbInstallColormap wfbInstallColormap
-#define fbLaneTable wfbLaneTable
-#define fbListInstalledColormaps wfbListInstalledColormaps
-#define fbMapWindow wfbMapWindow
-#define FbMergeRopBits wFbMergeRopBits
-#define fbOddStipple wfbOddStipple
-#define fbOddTile wfbOddTile
-#define fbOver wfbOver
-#define fbOver24 wfbOver24
-#define fbOverlayCloseScreen wfbOverlayCloseScreen
-#define fbOverlayCopyWindow wfbOverlayCopyWindow
-#define fbOverlayCreateScreenResources wfbOverlayCreateScreenResources
-#define fbOverlayCreateWindow wfbOverlayCreateWindow
-#define fbOverlayFinishScreenInit wfbOverlayFinishScreenInit
-#define fbOverlayGeneration wfbOverlayGeneration
-#define fbOverlayGetScreenPrivateIndex wfbOverlayGetScreenPrivateIndex
-#define fbOverlayPaintKey wfbOverlayPaintKey
-#define fbOverlayPaintWindow wfbOverlayPaintWindow
-#define fbOverlayScreenPrivateIndex wfbOverlayScreenPrivateIndex
-#define fbOverlaySetupScreen wfbOverlaySetupScreen
-#define fbOverlayUpdateLayerRegion wfbOverlayUpdateLayerRegion
-#define fbOverlayWindowExposures wfbOverlayWindowExposures
-#define fbOverlayWindowLayer wfbOverlayWindowLayer
-#define fbPadPixmap wfbPadPixmap
-#define fbPaintWindow wfbPaintWindow
-#define fbPictureInit wfbPictureInit
-#define fbPixmapToRegion wfbPixmapToRegion
-#define fbPolyArc wfbPolyArc
-#define fbPolyFillRect wfbPolyFillRect
-#define fbPolyGlyphBlt wfbPolyGlyphBlt
-#define fbPolyLine wfbPolyLine
-#define fbPolyline16 wfbPolyline16
-#define fbPolyline24 wfbPolyline24
-#define fbPolyline32 wfbPolyline32
-#define fbPolyline8 wfbPolyline8
-#define fbPolyPoint wfbPolyPoint
-#define fbPolySegment wfbPolySegment
-#define fbPolySegment16 wfbPolySegment16
-#define fbPolySegment24 wfbPolySegment24
-#define fbPolySegment32 wfbPolySegment32
-#define fbPolySegment8 wfbPolySegment8
-#define fbPositionWindow wfbPositionWindow
-#define fbPushFill wfbPushFill
-#define fbPushImage wfbPushImage
-#define fbPushPattern wfbPushPattern
-#define fbPushPixels wfbPushPixels
-#define fbPutImage wfbPutImage
-#define fbPutXYImage wfbPutXYImage
-#define fbPutZImage wfbPutZImage
-#define fbQueryBestSize wfbQueryBestSize
-#define fbRasterizeEdges wfbRasterizeEdges
-#define fbRasterizeTrapezoid wfbRasterizeTrapezoid
-#define fbRealizeFont wfbRealizeFont
-#define fbReduceRasterOp wfbReduceRasterOp
-#define fbReplicatePixel wfbReplicatePixel
-#define fbResolveColor wfbResolveColor
-#define fbRestoreAreas wfbRestoreAreas
-#define fbSaveAreas wfbSaveAreas
-#define fbScreenPrivateIndex wfbScreenPrivateIndex
-#define fbSegment wfbSegment
-#define fbSelectBres wfbSelectBres
-#define fbSetSpans wfbSetSpans
-#define fbSetupScreen wfbSetupScreen
-#define fbSetVisualTypes wfbSetVisualTypes
-#define fbSetVisualTypesAndMasks wfbSetVisualTypesAndMasks
-#define _fbSetWindowPixmap _wfbSetWindowPixmap
-#define fbSolid wfbSolid
-#define fbSolid24 wfbSolid24
-#define fbSolidBoxClipped wfbSolidBoxClipped
-#define fbStipple wfbStipple
-#define fbStipple1Bits wfbStipple1Bits
-#define fbStipple24Bits wfbStipple24Bits
-#define fbStipple2Bits wfbStipple2Bits
-#define fbStipple4Bits wfbStipple4Bits
-#define fbStipple8Bits wfbStipple8Bits
-#define fbStippleTable wfbStippleTable
-#define fbTile wfbTile
-#define fbTransparentSpan wfbTransparentSpan
-#define fbUninstallColormap wfbUninstallColormap
-#define fbUnmapWindow wfbUnmapWindow
-#define fbUnrealizeFont wfbUnrealizeFont
-#define fbValidateGC wfbValidateGC
-#define fbWinPrivateIndex wfbWinPrivateIndex
-#define fbZeroLine wfbZeroLine
-#define fbZeroSegment wfbZeroSegment
-#define xxScrPrivateIndex wfbxxScrPrivateIndex
-#define xxGCPrivateIndex wfbxxGCPrivateIndex
-#define xxColormapPrivateIndex wfbxxColormapPrivateIndex
-#define xxGeneration wfbxxGeneration
-#define xxPrintVisuals wfbxxPrintVisuals
-#define xxGCFuncs wfbxxGCFuncs
-#define xxGCOps wfbxxGCOps
-#define xxSetup wfbxxSetup
-#define composeFunctions wfbComposeFunctions