From 0938f1a2b05b1cb5565c72c8d03f4f7b1bf97f6b Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Wed, 20 Jul 2011 10:56:24 +0200 Subject: [PATCH] VA/X11: drop useless casts. --- va/x11/dri1_util.c | 18 +++++++++--------- va/x11/dri2_util.c | 12 ++++++------ va/x11/va_dricommon.c | 2 +- va/x11/va_x11.c | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/va/x11/dri1_util.c b/va/x11/dri1_util.c index d9afca6..7e5abf8 100644 --- a/va/x11/dri1_util.c +++ b/va/x11/dri1_util.c @@ -62,12 +62,12 @@ dri1Close(VADriverContextP ctx) struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; free_drawable_hashtable(ctx); - VA_DRIDestroyContext((Display *)ctx->native_dpy, ctx->x11_screen, dri_state->hwContextID); + VA_DRIDestroyContext(ctx->native_dpy, ctx->x11_screen, dri_state->hwContextID); assert(dri_state->pSAREA != MAP_FAILED); drmUnmap(dri_state->pSAREA, SAREA_MAX); assert(dri_state->fd >= 0); drmCloseOnce(dri_state->fd); - VA_DRICloseConnection((Display *)ctx->native_dpy, ctx->x11_screen); + VA_DRICloseConnection(ctx->native_dpy, ctx->x11_screen); } Bool @@ -87,7 +87,7 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name) dri_state->pSAREA = MAP_FAILED; dri_state->driConnectedFlag = VA_NONE; - if (!VA_DRIQueryDirectRenderingCapable((Display *)ctx->native_dpy, + if (!VA_DRIQueryDirectRenderingCapable(ctx->native_dpy, ctx->x11_screen, &direct_capable)) goto err_out0; @@ -95,12 +95,12 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name) if (!direct_capable) goto err_out0; - if (!VA_DRIGetClientDriverName((Display *)ctx->native_dpy, ctx->x11_screen, + if (!VA_DRIGetClientDriverName(ctx->native_dpy, ctx->x11_screen, &driver_major, &driver_minor, &driver_patch, driver_name)) goto err_out0; - if (!VA_DRIOpenConnection((Display *)ctx->native_dpy, ctx->x11_screen, + if (!VA_DRIOpenConnection(ctx->native_dpy, ctx->x11_screen, &dri_state->hSAREA, &BusID)) goto err_out0; @@ -115,14 +115,14 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name) if (drmGetMagic(dri_state->fd, &magic)) goto err_out1; - if (newlyopened && !VA_DRIAuthConnection((Display *)ctx->native_dpy, ctx->x11_screen, magic)) + if (newlyopened && !VA_DRIAuthConnection(ctx->native_dpy, ctx->x11_screen, magic)) goto err_out1; if (drmMap(dri_state->fd, dri_state->hSAREA, SAREA_MAX, &dri_state->pSAREA)) goto err_out1; - if (!VA_DRICreateContext((Display *)ctx->native_dpy, ctx->x11_screen, - DefaultVisual((Display *)ctx->native_dpy, ctx->x11_screen), + if (!VA_DRICreateContext(ctx->native_dpy, ctx->x11_screen, + DefaultVisual(ctx->native_dpy, ctx->x11_screen), &dri_state->hwContextID, &dri_state->hwContext)) goto err_out1; @@ -142,7 +142,7 @@ err_out1: if (dri_state->fd >= 0) drmCloseOnce(dri_state->fd); - VA_DRICloseConnection((Display *)ctx->native_dpy, ctx->x11_screen); + VA_DRICloseConnection(ctx->native_dpy, ctx->x11_screen); err_out0: if (*driver_name) diff --git a/va/x11/dri2_util.c b/va/x11/dri2_util.c index 8a6dd4f..a00df7b 100644 --- a/va/x11/dri2_util.c +++ b/va/x11/dri2_util.c @@ -50,7 +50,7 @@ dri2CreateDrawable(VADriverContextP ctx, XID x_drawable) dri2_drawable->base.x_drawable = x_drawable; dri2_drawable->base.x = 0; dri2_drawable->base.y = 0; - VA_DRI2CreateDrawable((Display *)ctx->native_dpy, x_drawable); + VA_DRI2CreateDrawable(ctx->native_dpy, x_drawable); return &dri2_drawable->base; } @@ -58,7 +58,7 @@ dri2CreateDrawable(VADriverContextP ctx, XID x_drawable) static void dri2DestroyDrawable(VADriverContextP ctx, struct dri_drawable *dri_drawable) { - VA_DRI2DestroyDrawable((Display *)ctx->native_dpy, dri_drawable->x_drawable); + VA_DRI2DestroyDrawable(ctx->native_dpy, dri_drawable->x_drawable); free(dri_drawable); } @@ -161,14 +161,14 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name) *driver_name = NULL; dri_state->fd = -1; dri_state->driConnectedFlag = VA_NONE; - if (!VA_DRI2QueryExtension((Display *)ctx->native_dpy, &event_base, &error_base)) + if (!VA_DRI2QueryExtension(ctx->native_dpy, &event_base, &error_base)) goto err_out; - if (!VA_DRI2QueryVersion((Display *)ctx->native_dpy, &major, &minor)) + if (!VA_DRI2QueryVersion(ctx->native_dpy, &major, &minor)) goto err_out; - if (!VA_DRI2Connect((Display *)ctx->native_dpy, RootWindow((Display *)ctx->native_dpy, ctx->x11_screen), + if (!VA_DRI2Connect(ctx->native_dpy, RootWindow(ctx->native_dpy, ctx->x11_screen), driver_name, &device_name)) goto err_out; @@ -181,7 +181,7 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name) if (drmGetMagic(dri_state->fd, &magic)) goto err_out; - if (!VA_DRI2Authenticate((Display *)ctx->native_dpy, RootWindow((Display *)ctx->native_dpy, ctx->x11_screen), + if (!VA_DRI2Authenticate(ctx->native_dpy, RootWindow(ctx->native_dpy, ctx->x11_screen), magic)) goto err_out; diff --git a/va/x11/va_dricommon.c b/va/x11/va_dricommon.c index bd30aab..07dc50c 100644 --- a/va/x11/va_dricommon.c +++ b/va/x11/va_dricommon.c @@ -50,7 +50,7 @@ do_drawable_hash(VADriverContextP ctx, XID drawable) dri_drawable = dri_state->createDrawable(ctx, drawable); dri_drawable->x_drawable = drawable; - dri_drawable->is_window = is_window((Display *)ctx->native_dpy, drawable); + dri_drawable->is_window = is_window(ctx->native_dpy, drawable); dri_drawable->next = dri_state->drawable_hash[index]; dri_state->drawable_hash[index] = dri_drawable; diff --git a/va/x11/va_x11.c b/va/x11/va_x11.c index 947b5b1..e44dfa7 100644 --- a/va/x11/va_x11.c +++ b/va/x11/va_x11.c @@ -107,12 +107,12 @@ static VAStatus va_NVCTRL_GetDriverName ( int direct_capable, driver_major, driver_minor, driver_patch; Bool result; - result = VA_NVCTRLQueryDirectRenderingCapable((Display *)ctx->native_dpy, ctx->x11_screen, + result = VA_NVCTRLQueryDirectRenderingCapable(ctx->native_dpy, ctx->x11_screen, &direct_capable); if (!result || !direct_capable) return VA_STATUS_ERROR_UNKNOWN; - result = VA_NVCTRLGetClientDriverName((Display *)ctx->native_dpy, ctx->x11_screen, + result = VA_NVCTRLGetClientDriverName(ctx->native_dpy, ctx->x11_screen, &driver_major, &driver_minor, &driver_patch, driver_name); if (!result) -- 2.11.0