glx: indent -br -i3 -npcs --no-tabs drisw_glx.c

This commit is contained in:
RALOVICH, Kristóf 2008-10-13 13:47:37 +02:00 committed by Brian Paul
parent 4e88ae5639
commit 60aa0918a1
1 changed files with 274 additions and 270 deletions

View File

@ -34,17 +34,20 @@ typedef struct __GLXDRIdisplayPrivateRec __GLXDRIdisplayPrivate;
typedef struct __GLXDRIcontextPrivateRec __GLXDRIcontextPrivate;
typedef struct __GLXDRIdrawablePrivateRec __GLXDRIdrawablePrivate;
struct __GLXDRIdisplayPrivateRec {
struct __GLXDRIdisplayPrivateRec
{
__GLXDRIdisplay base;
};
struct __GLXDRIcontextPrivateRec {
struct __GLXDRIcontextPrivateRec
{
__GLXDRIcontext base;
__DRIcontext *driContext;
__GLXscreenConfigs *psc;
};
struct __GLXDRIdrawablePrivateRec {
struct __GLXDRIdrawablePrivateRec
{
__GLXDRIdrawable base;
GC gc;
@ -59,7 +62,8 @@ struct __GLXDRIdrawablePrivateRec {
* swrast loader functions
*/
static Bool XCreateDrawable(__GLXDRIdrawablePrivate *pdp,
static Bool
XCreateDrawable(__GLXDRIdrawablePrivate * pdp,
Display * dpy, XID drawable, int visualid)
{
XGCValues gcvalues;
@ -83,10 +87,7 @@ static Bool XCreateDrawable(__GLXDRIdrawablePrivate *pdp,
visMask = (VisualScreenMask | VisualIDMask);
pdp->visinfo = XGetVisualInfo(dpy, visMask, &visTemp, &num_visuals);
pdp->ximage = XCreateImage(dpy,
pdp->visinfo->visual,
pdp->visinfo->depth,
ZPixmap, 0, /* format, offset */
pdp->ximage = XCreateImage(dpy, pdp->visinfo->visual, pdp->visinfo->depth, ZPixmap, 0, /* format, offset */
NULL, /* data */
0, 0, /* size */
32, /* bitmap_pad */
@ -98,8 +99,8 @@ static Bool XCreateDrawable(__GLXDRIdrawablePrivate *pdp,
return True;
}
static void XDestroyDrawable(__GLXDRIdrawablePrivate *pdp,
Display *dpy, XID drawable)
static void
XDestroyDrawable(__GLXDRIdrawablePrivate * pdp, Display * dpy, XID drawable)
{
XDestroyImage(pdp->ximage);
XFree(pdp->visinfo);
@ -110,8 +111,7 @@ static void XDestroyDrawable(__GLXDRIdrawablePrivate *pdp,
static void
swrastGetDrawableInfo(__DRIdrawable * draw,
int *x, int *y, int *w, int *h,
void *loaderPrivate)
int *x, int *y, int *w, int *h, void *loaderPrivate)
{
__GLXDRIdrawablePrivate *pdp = loaderPrivate;
__GLXDRIdrawable *pdraw = &(pdp->base);;
@ -139,8 +139,7 @@ bytes_per_line(int w, int bpp, unsigned mul)
static void
swrastPutImage(__DRIdrawable * draw, int op,
int x, int y, int w, int h, char *data,
void *loaderPrivate)
int x, int y, int w, int h, char *data, void *loaderPrivate)
{
__GLXDRIdrawablePrivate *pdp = loaderPrivate;
__GLXDRIdrawable *pdraw = &(pdp->base);;
@ -175,8 +174,7 @@ swrastPutImage(__DRIdrawable *draw, int op,
static void
swrastGetImage(__DRIdrawable * draw,
int x, int y, int w, int h, char *data,
void *loaderPrivate)
int x, int y, int w, int h, char *data, void *loaderPrivate)
{
__GLXDRIdrawablePrivate *pdp = loaderPrivate;
__GLXDRIdrawable *pdraw = &(pdp->base);;
@ -214,7 +212,8 @@ static const __DRIextension *loader_extensions[] = {
* GLXDRI functions
*/
static void driDestroyContext(__GLXDRIcontext *context,
static void
driDestroyContext(__GLXDRIcontext * context,
__GLXscreenConfigs * psc, Display * dpy)
{
__GLXDRIcontextPrivate *pcp = (__GLXDRIcontextPrivate *) context;
@ -225,18 +224,19 @@ static void driDestroyContext(__GLXDRIcontext *context,
Xfree(pcp);
}
static Bool driBindContext(__GLXDRIcontext *context,
static Bool
driBindContext(__GLXDRIcontext * context,
__GLXDRIdrawable * draw, __GLXDRIdrawable * read)
{
__GLXDRIcontextPrivate *pcp = (__GLXDRIcontextPrivate *) context;
const __DRIcoreExtension *core = pcp->psc->core;
return (*core->bindContext) (pcp->driContext,
draw->driDrawable,
read->driDrawable);
draw->driDrawable, read->driDrawable);
}
static void driUnbindContext(__GLXDRIcontext *context)
static void
driUnbindContext(__GLXDRIcontext * context)
{
__GLXDRIcontextPrivate *pcp = (__GLXDRIcontextPrivate *) context;
const __DRIcoreExtension *core = pcp->psc->core;
@ -244,10 +244,10 @@ static void driUnbindContext(__GLXDRIcontext *context)
(*core->unbindContext) (pcp->driContext);
}
static __GLXDRIcontext *driCreateContext(__GLXscreenConfigs *psc,
static __GLXDRIcontext *
driCreateContext(__GLXscreenConfigs * psc,
const __GLcontextModes * mode,
GLXContext gc,
GLXContext shareList, int renderType)
GLXContext gc, GLXContext shareList, int renderType)
{
__GLXDRIcontextPrivate *pcp, *pcp_shared;
__GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) mode;
@ -282,7 +282,8 @@ static __GLXDRIcontext *driCreateContext(__GLXscreenConfigs *psc,
return &pcp->base;
}
static void driDestroyDrawable(__GLXDRIdrawable *pdraw)
static void
driDestroyDrawable(__GLXDRIdrawable * pdraw)
{
__GLXDRIdrawablePrivate *pdp = (__GLXDRIdrawablePrivate *) pdraw;
const __DRIcoreExtension *core = pdraw->psc->core;
@ -293,10 +294,10 @@ static void driDestroyDrawable(__GLXDRIdrawable *pdraw)
Xfree(pdp);
}
static __GLXDRIdrawable *driCreateDrawable(__GLXscreenConfigs *psc,
static __GLXDRIdrawable *
driCreateDrawable(__GLXscreenConfigs * psc,
XID xDrawable,
GLXDrawable drawable,
const __GLcontextModes *modes)
GLXDrawable drawable, const __GLcontextModes * modes)
{
__GLXDRIdrawable *pdraw;
__GLXDRIdrawablePrivate *pdp;
@ -320,9 +321,7 @@ static __GLXDRIdrawable *driCreateDrawable(__GLXscreenConfigs *psc,
/* Create a new drawable */
pdraw->driDrawable =
(*swrast->createNewDrawable)(psc->__driScreen,
config->driConfig,
pdp);
(*swrast->createNewDrawable) (psc->__driScreen, config->driConfig, pdp);
if (!pdraw->driDrawable) {
XDestroyDrawable(pdp, psc->dpy, xDrawable);
@ -335,12 +334,14 @@ static __GLXDRIdrawable *driCreateDrawable(__GLXscreenConfigs *psc,
return pdraw;
}
static void driSwapBuffers(__GLXDRIdrawable *pdraw)
static void
driSwapBuffers(__GLXDRIdrawable * pdraw)
{
(*pdraw->psc->core->swapBuffers) (pdraw->driDrawable);
}
static void driDestroyScreen(__GLXscreenConfigs *psc)
static void
driDestroyScreen(__GLXscreenConfigs * psc)
{
/* Free the direct rendering per screen data */
(*psc->core->destroyScreen) (psc->__driScreen);
@ -349,7 +350,8 @@ static void driDestroyScreen(__GLXscreenConfigs *psc)
dlclose(psc->driver);
}
static __GLXDRIscreen *driCreateScreen(__GLXscreenConfigs *psc, int screen,
static __GLXDRIscreen *
driCreateScreen(__GLXscreenConfigs * psc, int screen,
__GLXdisplayPrivate * priv)
{
__GLXDRIscreen *psp;
@ -420,7 +422,8 @@ static __GLXDRIscreen *driCreateScreen(__GLXscreenConfigs *psc, int screen,
/* Called from __glXFreeDisplayPrivate.
*/
static void driDestroyDisplay(__GLXDRIdisplay *dpy)
static void
driDestroyDisplay(__GLXDRIdisplay * dpy)
{
Xfree(dpy);
}
@ -430,7 +433,8 @@ static void driDestroyDisplay(__GLXDRIdisplay *dpy)
* This is called from __glXInitialize() when we are given a new
* display pointer.
*/
_X_HIDDEN __GLXDRIdisplay *driswCreateDisplay(Display *dpy)
_X_HIDDEN __GLXDRIdisplay *
driswCreateDisplay(Display * dpy)
{
__GLXDRIdisplayPrivate *pdpyp;