diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2006-08-01 13:45:43 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2006-08-01 13:45:43 -0700 |
commit | ee02e647882a4be29e1130bd79904ee79ed6b802 (patch) | |
tree | f4a2d76b462019f4ea16a7c2004d257db6684ab6 /fb/fbglyph.c | |
parent | a69335dc299be6de8b82ed34de1cb30f1255feb4 (diff) |
Wrap libwfb memory access.
Use the READ and WRITE macros to wrap memory accesses that could be in video
memory. Add MEMCPY_WRAPPED and MEMSET_WRAPPED macros to wrap memcpy and
memset, respectively.
Diffstat (limited to 'fb/fbglyph.c')
-rw-r--r-- | fb/fbglyph.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fb/fbglyph.c b/fb/fbglyph.c index 78e26a993..2c19b742f 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) ((d)[n] = (CARD8) fg) -#define WRITE2(d,n,fg) (*(CARD16 *) &(d[n]) = (CARD16) fg) -#define WRITE4(d,n,fg) (*(CARD32 *) &(d[n]) = (CARD32) fg) +#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) #if FB_UNIT == 6 && IMAGE_BYTE_ORDER == LSBFirst -#define WRITE8(d) (*(FbBits *) &(d[0]) = fg) +#define WRITE8(d) WRITE((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 = *stipple++; + bits = READ(stipple++); n = lshift; dst = dstLine; while (bits) |