diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-03-08 23:41:56 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-03-24 20:16:24 +0100 |
commit | a2553942730c7bd9553f3e67bc92f8bb316d619a (patch) | |
tree | fee99adfe5d793f83b4eac5415964d8268f3b1f3 | |
parent | 8503271f9b5c2f2993de06954054ad33d6fad921 (diff) |
XvMC: unify surface functions
Like for the subpicture stuff, share the "do-nothing" functions ...
And fix function name spelling, too.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | src/i830_hwmc.c | 52 |
1 files changed, 14 insertions, 38 deletions
diff --git a/src/i830_hwmc.c b/src/i830_hwmc.c index a55b7e6a..37c17091 100644 --- a/src/i830_hwmc.c +++ b/src/i830_hwmc.c @@ -210,34 +210,12 @@ static int i915_xvmc_create_context(ScrnInfoPtr scrn, XvMCContextPtr pContext, return Success; } -static int i915_xvmc_create_surface(ScrnInfoPtr scrn, XvMCSurfacePtr pSurf, - int *num_priv, long **priv) -{ - intel_screen_private *intel = intel_get_screen_private(scrn); - - if (!intel->XvMCEnabled) { - xf86DrvMsg(scrn->scrnIndex, X_ERROR, - "[XvMC] i915: XvMC disabled!\n"); - return BadAlloc; - } - - *priv = NULL; - *num_priv = 0; - - return Success; -} - static void i915_xvmc_destroy_context(ScrnInfoPtr scrn, XvMCContextPtr pContext) { return; } -static void i915_xvmc_destroy_surface(ScrnInfoPtr scrn, XvMCSurfacePtr pSurf) -{ - return; -} - static int create_subpicture(ScrnInfoPtr scrn, XvMCSubpicturePtr subpicture, int *num_priv, CARD32 ** priv) { @@ -248,6 +226,16 @@ static void destroy_subpicture(ScrnInfoPtr scrn, XvMCSubpicturePtr subpicture) { } +static int create_surface(ScrnInfoPtr scrn, XvMCSurfacePtr surface, + int *num_priv, CARD32 ** priv) +{ + return Success; +} + +static void destroy_surface(ScrnInfoPtr scrn, XvMCSurfacePtr surface) +{ +} + /* Fill in the device dependent adaptor record. * This is named "Intel(R) Textured Video" because this code falls under the * XV extenstion, the name must match or it won't be used. @@ -265,10 +253,8 @@ static XF86MCAdaptorRec pAdapt = { (xf86XvMCCreateContextProcPtr) i915_xvmc_create_context, .DestroyContext = (xf86XvMCDestroyContextProcPtr) i915_xvmc_destroy_context, - .CreateSurface = - (xf86XvMCCreateSurfaceProcPtr) i915_xvmc_create_surface, - .DestroySurface = - (xf86XvMCDestroySurfaceProcPtr) i915_xvmc_destroy_surface, + .CreateSurface = create_surface, + .DestroySurface = destroy_surface, .CreateSubpicture = create_subpicture, .DestroySubpicture = destroy_subpicture, }; @@ -330,16 +316,6 @@ static void destroy_context(ScrnInfoPtr scrn, XvMCContextPtr context) Xfree(private_context); } -static int create_surface(ScrnInfoPtr scrn, XvMCSurfacePtr surface, - int *num_priv, CARD32 ** priv) -{ - return Success; -} - -static void destory_surface(ScrnInfoPtr scrn, XvMCSurfacePtr surface) -{ -} - static XF86MCSurfaceInfoRec yv12_mpeg2_vld_surface = { FOURCC_YV12, XVMC_CHROMA_FORMAT_420, @@ -403,7 +379,7 @@ static XF86MCAdaptorRec adaptor_vld = { .CreateContext = create_context, .DestroyContext = destroy_context, .CreateSurface = create_surface, - .DestroySurface = destory_surface, + .DestroySurface = destroy_surface, .CreateSubpicture = create_subpicture, .DestroySubpicture = destroy_subpicture }; @@ -416,7 +392,7 @@ static XF86MCAdaptorRec adaptor = { .CreateContext = create_context, .DestroyContext = destroy_context, .CreateSurface = create_surface, - .DestroySurface = destory_surface, + .DestroySurface = destroy_surface, .CreateSubpicture = create_subpicture, .DestroySubpicture = destroy_subpicture }; |