mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-11 06:28:09 +02:00
[g3dvl] remove unused backbuffer from xvmc
This commit is contained in:
parent
7f426615ab
commit
e8a701f40b
3 changed files with 0 additions and 58 deletions
|
|
@ -285,7 +285,6 @@ Status XvMCDestroyContext(Display *dpy, XvMCContext *context)
|
|||
|
||||
context_priv = context->privData;
|
||||
vctx = context_priv->vctx;
|
||||
pipe_surface_reference(&context_priv->backbuffer, NULL);
|
||||
vscreen = vctx->vscreen;
|
||||
vl_video_destroy(vctx);
|
||||
vl_screen_destroy(vscreen);
|
||||
|
|
|
|||
|
|
@ -95,57 +95,6 @@ static enum pipe_mpeg12_motion_type MotionToPipe(int xvmc_motion_type, unsigned
|
|||
return -1;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static bool
|
||||
CreateOrResizeBackBuffer(struct vl_context *vctx, unsigned int width, unsigned int height,
|
||||
struct pipe_surface **backbuffer)
|
||||
{
|
||||
struct pipe_video_context *vpipe;
|
||||
struct pipe_resource template;
|
||||
struct pipe_resource *tex;
|
||||
|
||||
assert(vctx);
|
||||
|
||||
vpipe = vctx->vpipe;
|
||||
|
||||
if (*backbuffer) {
|
||||
if ((*backbuffer)->width != width || (*backbuffer)->height != height)
|
||||
pipe_surface_reference(backbuffer, NULL);
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
memset(&template, 0, sizeof(struct pipe_resource));
|
||||
template.target = PIPE_TEXTURE_2D;
|
||||
template.format = vctx->vscreen->format;
|
||||
template.last_level = 0;
|
||||
template.width0 = width;
|
||||
template.height0 = height;
|
||||
template.depth0 = 1;
|
||||
template.array_size = 1;
|
||||
template.usage = PIPE_USAGE_DEFAULT;
|
||||
template.bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_BLIT_SOURCE;
|
||||
template.flags = 0;
|
||||
|
||||
tex = vpipe->screen->resource_create(vpipe->screen, &template);
|
||||
if (!tex)
|
||||
return false;
|
||||
|
||||
*backbuffer = vpipe->screen->get_tex_surface(vpipe->screen, tex, 0, 0, 0,
|
||||
template.bind);
|
||||
pipe_resource_reference(&tex, NULL);
|
||||
|
||||
if (!*backbuffer)
|
||||
return false;
|
||||
|
||||
/* Clear the backbuffer in case the video doesn't cover the whole window */
|
||||
/* FIXME: Need to clear every time a frame moves and leaves dirty rects */
|
||||
vpipe->surface_fill(vpipe, *backbuffer, 0, 0, width, height, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
MacroBlocksToPipe(struct pipe_screen *screen,
|
||||
unsigned int xvmc_picture_structure,
|
||||
|
|
@ -435,11 +384,6 @@ Status XvMCPutSurface(Display *dpy, XvMCSurface *surface, Drawable drawable,
|
|||
subpicture_priv = surface_priv->subpicture ? surface_priv->subpicture->privData : NULL;
|
||||
vpipe = context_priv->vctx->vpipe;
|
||||
|
||||
#if 0
|
||||
if (!CreateOrResizeBackBuffer(context_priv->vctx, width, height, &context_priv->backbuffer))
|
||||
return BadAlloc;
|
||||
#endif
|
||||
|
||||
if (subpicture_priv) {
|
||||
struct pipe_video_rect src_rect = {surface_priv->subx, surface_priv->suby, surface_priv->subw, surface_priv->subh};
|
||||
struct pipe_video_rect dst_rect = {surface_priv->surfx, surface_priv->surfy, surface_priv->surfw, surface_priv->surfh};
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ struct pipe_fence_handle;
|
|||
typedef struct
|
||||
{
|
||||
struct vl_context *vctx;
|
||||
struct pipe_surface *backbuffer;
|
||||
unsigned short subpicture_max_width;
|
||||
unsigned short subpicture_max_height;
|
||||
} XvMCContextPrivate;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue