diff options
author | Roland Scheidegger <[email protected]> | 2005-07-01 00:08:46 +0000 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2005-07-01 00:08:46 +0000 |
commit | cf5b2f7419b28cdd533c60e205d5a90d96e85c8e (patch) | |
tree | c9e0fe4db16d0a4fdbe2b7f0711203770be23a75 /src/mesa/drivers/dri/i830 | |
parent | c212abf99af494f024b0b981a83350f7ac9821ef (diff) |
remove common macros used in the span functions of most drivers from the individual drivers and put them in common code. It is still possible for a driver to define its own macros if it has special needs. This affects CLIPPIXEL, CLIPSPAN, HW_CLIPLOOP, HW_ENDCLIPLOOP, and for drivers using the spantmp2 template also GET_SRC_PTR and GET_DST_PTR.
Diffstat (limited to 'src/mesa/drivers/dri/i830')
-rw-r--r-- | src/mesa/drivers/dri/i830/i830_span.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/mesa/drivers/dri/i830/i830_span.c b/src/mesa/drivers/dri/i830/i830_span.c index a17ec9b6ac9..4a86784e8af 100644 --- a/src/mesa/drivers/dri/i830/i830_span.c +++ b/src/mesa/drivers/dri/i830/i830_span.c @@ -81,39 +81,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define INIT_MONO_PIXEL(p,color)\ p = PACK_COLOR_565(color[0],color[1],color[2]) -#define CLIPPIXEL(_x,_y) (_x >= minx && _x < maxx && \ - _y >= miny && _y < maxy) - -#define CLIPSPAN( _x, _y, _n, _x1, _n1, _i ) \ - if ( _y < miny || _y >= maxy ) { \ - _n1 = 0, _x1 = x; \ - } else { \ - _n1 = _n; \ - _x1 = _x; \ - if ( _x1 < minx ) _i += (minx-_x1), n1 -= (minx-_x1), _x1 = minx; \ - if ( _x1 + _n1 >= maxx ) n1 -= (_x1 + n1 - maxx); \ - } - #define Y_FLIP(_y) (height - _y - 1) - #define HW_LOCK() -#define HW_CLIPLOOP() \ - do { \ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ - int _nc = dPriv->numClipRects; \ - while (_nc--) { \ - int minx = dPriv->pClipRects[_nc].x1 - dPriv->x; \ - int miny = dPriv->pClipRects[_nc].y1 - dPriv->y; \ - int maxx = dPriv->pClipRects[_nc].x2 - dPriv->x; \ - int maxy = dPriv->pClipRects[_nc].y2 - dPriv->y; - - -#define HW_ENDCLIPLOOP() \ - } \ - } while (0) - #define HW_UNLOCK() /* 16 bit, 565 rgb color spanline and pixel functions @@ -137,9 +108,6 @@ do { \ #define TAG(x) i830##x##_565 #include "spantmp.h" - - - /* 15 bit, 555 rgb color spanline and pixel functions */ #define WRITE_RGBA( _x, _y, r, g, b, a ) \ |