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/fbsolid.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/fbsolid.c')
-rw-r--r-- | fb/fbsolid.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/fb/fbsolid.c b/fb/fbsolid.c index 89effe63b..6b5ed0fa1 100644 --- a/fb/fbsolid.c +++ b/fb/fbsolid.c @@ -70,12 +70,12 @@ fbSolid (FbBits *dst, n = nmiddle; if (!and) while (n--) - *dst++ = xor; + WRITE(dst++, xor); else while (n--) { - *dst = FbDoRRop (*dst, and, xor); - dst++; + WRITE(dst, FbDoRRop (READ(dst), and, xor)); + dst++; } if (endmask) FbDoRightMaskByteRRop(dst,endbyte,endmask,and,xor); @@ -160,26 +160,26 @@ fbSolid24 (FbBits *dst, { if (startmask) { - *dst = FbDoMaskRRop(*dst, andS, xorS, startmask); - dst++; + WRITE(dst, FbDoMaskRRop(READ(dst), andS, xorS, startmask)); + dst++; } n = nmiddle; if (!and0) { while (n >= 3) { - *dst++ = xor0; - *dst++ = xor1; - *dst++ = xor2; + WRITE(dst++, xor0); + WRITE(dst++, xor1); + WRITE(dst++, xor2); n -= 3; } if (n) { - *dst++ = xor0; + WRITE(dst++, xor0); n--; if (n) { - *dst++ = xor1; + WRITE(dst++, xor1); } } } @@ -187,28 +187,28 @@ fbSolid24 (FbBits *dst, { while (n >= 3) { - *dst = FbDoRRop (*dst, and0, xor0); - dst++; - *dst = FbDoRRop (*dst, and1, xor1); - dst++; - *dst = FbDoRRop (*dst, and2, xor2); - dst++; + WRITE(dst, FbDoRRop (READ(dst), and0, xor0)); + dst++; + WRITE(dst, FbDoRRop (READ(dst), and1, xor1)); + dst++; + WRITE(dst, FbDoRRop (READ(dst), and2, xor2)); + dst++; n -= 3; } if (n) { - *dst = FbDoRRop (*dst, and0, xor0); - dst++; + WRITE(dst, FbDoRRop (READ(dst), and0, xor0)); + dst++; n--; if (n) { - *dst = FbDoRRop (*dst, and1, xor1); - dst++; + WRITE(dst, FbDoRRop (READ(dst), and1, xor1)); + dst++; } } } if (endmask) - *dst = FbDoMaskRRop (*dst, andE, xorE, endmask); + WRITE(dst, FbDoMaskRRop (READ(dst), andE, xorE, endmask)); dst += dstStride; } } |