diff options
Diffstat (limited to 'va/x11/va_dricommon.c')
-rw-r--r-- | va/x11/va_dricommon.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/va/x11/va_dricommon.c b/va/x11/va_dricommon.c index 603354b..eaab8e3 100644 --- a/va/x11/va_dricommon.c +++ b/va/x11/va_dricommon.c @@ -38,7 +38,7 @@ is_window(Display *dpy, Drawable drawable) static struct dri_drawable * do_drawable_hash(VADriverContextP ctx, XID drawable) { - struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + struct dri_state *dri_state = (struct dri_state *)ctx->drm_state; int index = drawable % DRAWABLE_HASH_SZ; struct dri_drawable *dri_drawable = dri_state->drawable_hash[index]; @@ -60,7 +60,7 @@ do_drawable_hash(VADriverContextP ctx, XID drawable) void free_drawable(VADriverContextP ctx, struct dri_drawable* dri_drawable) { - struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + struct dri_state *dri_state = (struct dri_state *)ctx->drm_state; int i = 0; while (i++ < DRAWABLE_HASH_SZ) { @@ -74,7 +74,7 @@ free_drawable(VADriverContextP ctx, struct dri_drawable* dri_drawable) void free_drawable_hashtable(VADriverContextP ctx) { - struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + struct dri_state *dri_state = (struct dri_state *)ctx->drm_state; int i; struct dri_drawable *dri_drawable, *prev; @@ -91,10 +91,10 @@ free_drawable_hashtable(VADriverContextP ctx) } } -struct dri_drawable * +struct drm_drawable * dri_get_drawable(VADriverContextP ctx, void *drawable) { - return do_drawable_hash(ctx, (XID) drawable); + return &(do_drawable_hash(ctx, (XID) drawable)->base); } /* FIXME: remove swap_buffer and get_rendering_buffer @@ -104,15 +104,15 @@ dri_get_drawable(VADriverContextP ctx, void *drawable) void dri_swap_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) { - struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + struct dri_state *dri_state = (struct dri_state *)ctx->drm_state; - dri_state->swapBuffer(ctx, dri_drawable); + dri_state->base.swapBuffer(ctx, &dri_drawable->base); } union dri_buffer * dri_get_rendering_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) { - struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; + struct dri_state *dri_state = (struct dri_state *)ctx->drm_state; - return dri_state->getRenderingBuffer(ctx, dri_drawable); + return dri_state->base.getRenderingBuffer(ctx, &dri_drawable->base); } |