* Authors:
* Kevin E. Martin <kevin@precisioninsight.com>
*
+ * When we're building the XMesa driver for stand-alone Mesa we
+ * include this file when building the xm_*.c files.
+ * We need to define some types and macros differently when building
+ * in the Xserver vs. stand-alone Mesa.
*/
#ifndef _XMESA_X_H_
#define XMesaSetBackground XSetBackground
#define XMesaSetPlaneMask XSetPlaneMask
#define XMesaSetFunction XSetFunction
-#define XMesaSetDashes XSetDashes
-#define XMesaSetLineAttributes XSetLineAttributes
#define XMesaSetFillStyle XSetFillStyle
#define XMesaSetTile XSetTile
-#define XMesaSetStipple XSetStipple
#define XMesaDrawPoint XDrawPoint
#define XMesaDrawPoints XDrawPoints
-#define XMesaDrawLine XDrawLine
#define XMesaFillRectangle XFillRectangle
#define XMesaPutImage XPutImage
#define XMesaCopyArea XCopyArea
-#define XMesaFillPolygon XFillPolygon
#define XMesaCreatePixmap XCreatePixmap
#define XMesaFreePixmap XFreePixmap
* Authors:
* Kevin E. Martin <kevin@precisioninsight.com>
*
+ * When we're building the XMesa driver for use in the X server (as the
+ * indirect render) we include this file when building the xm_*.c files.
+ * We need to define some types and macros differently when building
+ * in the Xserver vs. stand-alone Mesa.
*/
#ifndef _XMESA_XF86_H_
dixChangeGC(NullClient, __gc, __mask, NULL, __v); \
} while (0)
-#define XMesaSetDashes(__d,__gc,__do,__dl,__n) \
-do { \
- (void) __d; \
- SetDashes(__gc, __do, __n, (unsigned char *)__dl); \
-} while (0)
-
-#define XMesaSetLineAttributes(__d,__gc,__lw,__ls,__cs,__js) \
-do { \
- CARD32 __v[4]; \
- (void) __d; \
- __v[0] = __lw; \
- __v[1] = __ls; \
- __v[2] = __cs; \
- __v[3] = __js; \
- dixChangeGC(NullClient, __gc, \
- GCLineWidth|GCLineStyle|GCCapStyle|GCJoinStyle, \
- __v, NULL); \
-} while (0)
-
#define XMesaSetForeground(d,gc,v) XMesaSetGeneric(d,gc,v,GCForeground)
#define XMesaSetBackground(d,gc,v) XMesaSetGeneric(d,gc,v,GCBackground)
#define XMesaSetPlaneMask(d,gc,v) XMesaSetGeneric(d,gc,v,GCPlaneMask)
#define XMesaSetFillStyle(d,gc,v) XMesaSetGeneric(d,gc,v,GCFillStyle)
#define XMesaSetTile(d,gc,v) XMesaSetGenericPtr(d,gc,v,GCTile)
-#define XMesaSetStipple(d,gc,v) XMesaSetGenericPtr(d,gc,v,GCStipple)
#define XMesaDrawPoint(__d,__b,__gc,__x,__y) \
do { \
(*gc->ops->PolyPoint)(__b, __gc, __m, __n, __p); \
} while (0)
-#define XMesaDrawLine(__d,__b,__gc,__x0,__y0,__x1,__y1) \
-do { \
- XMesaPoint __p[2]; \
- (void) __d; \
- ValidateGC(__b, __gc); \
- __p[0].x = __x0; \
- __p[0].y = __y0; \
- __p[1].x = __x1; \
- __p[1].y = __y1; \
- (*__gc->ops->Polylines)(__b, __gc, CoordModeOrigin, 2, __p); \
-} while (0)
-
#define XMesaFillRectangle(__d,__b,__gc,__x,__y,__w,__h) \
do { \
xRectangle __r[1]; \
__sx, __sy, __w, __h, __x, __y); \
} while (0)
-#define XMesaFillPolygon(__d,__b,__gc,__p,__n,__s,__m) \
-do { \
- (void) __d; \
- ValidateGC(__b, __gc); \
- (*__gc->ops->FillPolygon)(__b, __gc, __s, __m, __n, __p); \
-} while (0)
/* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */
#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \
(*__d->CreatePixmap)(__d, __w, __h, __depth)
+
#define XMesaFreePixmap(__d,__b) \
(*__d->DestroyPixmap)(__b)