summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2010-03-08 23:41:56 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2010-04-08 11:22:17 +0200
commitcfa907adf800e91a3c1f4698ac701b9b83fa600b (patch)
treecc60ac8d74fd0c229b4467a89c586311b75ab756
parent036cd4bb82131c08b79f596667f00b19a0c8ab79 (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.c52
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
};