diff options
author | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2007-12-25 08:32:47 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2007-12-25 08:32:47 +0800 |
commit | ed9ff6f30fff33fe2d60715f1b503047f8e1ef01 (patch) | |
tree | 844a6d6b72b3a6af3a6d76c63933913e552187fb /src/xvmc/intel_xvmc.h | |
parent | f0ced5edaeec3e7741828eab728417843326d56f (diff) |
xvmc: consolidate put surface interfaces
Make surface list track like context list, and move
generic PutSurface code out of i915. So MC driver just
needs to fill specific the command params, and we can
get one single type of intel xvmc command to issue,
ddx driver's put_image_size got removed.
Fix last commit with missing XvMCContext assignment.
Fix priv_data free with apropriate X11 XFree.
Diffstat (limited to 'src/xvmc/intel_xvmc.h')
-rw-r--r-- | src/xvmc/intel_xvmc.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/xvmc/intel_xvmc.h b/src/xvmc/intel_xvmc.h index 19c5f4cd..8ebb14bf 100644 --- a/src/xvmc/intel_xvmc.h +++ b/src/xvmc/intel_xvmc.h @@ -88,7 +88,7 @@ extern Status _xvmc_destroy_context(Display *dpy, XvMCContext *context); extern Status _xvmc_create_surface(Display *dpy, XvMCContext *context, XvMCSurface *surface, int *priv_count, - uint **priv_data); + CARD32 **priv_data); extern Status _xvmc_destroy_surface(Display *dpy, XvMCSurface *surface); @@ -105,6 +105,16 @@ typedef struct _intel_xvmc_context { struct _intel_xvmc_context *next; } intel_xvmc_context_t, *intel_xvmc_context_ptr; +typedef struct _intel_xvmc_surface { + XvMCSurface *surface; + XvImage *image; + GC gc; + Bool gc_init; + Drawable last_draw; + struct intel_xvmc_command data; + struct _intel_xvmc_surface *next; +} intel_xvmc_surface_t, *intel_xvmc_surface_ptr; + typedef struct _intel_xvmc_drm_map { drm_handle_t handle; unsigned long offset; @@ -150,6 +160,8 @@ typedef struct _intel_xvmc_driver { int num_ctx; intel_xvmc_context_ptr ctx_list; + int num_surf; + intel_xvmc_surface_ptr surf_list; void *private; @@ -185,7 +197,7 @@ typedef struct _intel_xvmc_driver { unsigned short srcw, unsigned short srch, short destx, short desty, unsigned short destw, unsigned short desth, - int flags); + int flags, struct intel_xvmc_command *data); Status (*get_surface_status)(Display *display, XvMCSurface *surface, int *stat); @@ -240,5 +252,6 @@ static inline const char* intel_xvmc_decoder_string(int flag) } extern intel_xvmc_context_ptr intel_xvmc_find_context(XID id); +extern intel_xvmc_surface_ptr intel_xvmc_find_surface(XID id); #endif |