1
mirror of https://github.com/mpv-player/mpv synced 2024-11-07 01:47:00 +01:00

vo_opengl: remove hwdec unmap_image callback

Not needed anymore; see previous commit.
This commit is contained in:
wm4 2015-03-14 22:39:22 +01:00
parent a1b3af5df3
commit af705d0122
5 changed files with 1 additions and 22 deletions

View File

@ -37,14 +37,9 @@ struct gl_hwdec_driver {
// Called on initialization, and every time the video size changes.
// *params must be set to the format the hw textures return.
int (*reinit)(struct gl_hwdec *hw, struct mp_image_params *params);
// Return textures that contain the given hw_image.
// Note that the caller keeps a reference to hw_image until unmap_image
// is called, so the hwdec driver doesn't need to do that.
// Return textures that contain a copy or reference of the given hw_image.
int (*map_image)(struct gl_hwdec *hw, struct mp_image *hw_image,
GLuint *out_textures);
// Undo map_image(). The user of map_image() calls this when the textures
// are not needed anymore.
void (*unmap_image)(struct gl_hwdec *hw);
void (*destroy)(struct gl_hwdec *hw);
};

View File

@ -135,16 +135,11 @@ static int map_image(struct gl_hwdec *hw, struct mp_image *hw_image,
return 0;
}
static void unmap_image(struct gl_hwdec *hw)
{
}
const struct gl_hwdec_driver gl_hwdec_vaglx = {
.api_name = "vaapi",
.imgfmt = IMGFMT_VAAPI,
.create = create,
.reinit = reinit,
.map_image = map_image,
.unmap_image = unmap_image,
.destroy = destroy,
};

View File

@ -135,8 +135,6 @@ static int map_image(struct gl_hwdec *hw, struct mp_image *hw_image,
return 0;
}
static void unmap_image(struct gl_hwdec *hw) { }
static void destroy(struct gl_hwdec *hw)
{
struct priv *p = hw->priv;
@ -153,6 +151,5 @@ const struct gl_hwdec_driver gl_hwdec_vda = {
.create = create,
.reinit = reinit,
.map_image = map_image,
.unmap_image = unmap_image,
.destroy = destroy,
};

View File

@ -199,16 +199,11 @@ static int map_image(struct gl_hwdec *hw, struct mp_image *hw_image,
return 0;
}
static void unmap_image(struct gl_hwdec *hw)
{
}
const struct gl_hwdec_driver gl_hwdec_vdpau = {
.api_name = "vdpau",
.imgfmt = IMGFMT_VDPAU,
.create = create,
.reinit = reinit,
.map_image = map_image,
.unmap_image = unmap_image,
.destroy = destroy,
};

View File

@ -1753,9 +1753,6 @@ void gl_video_render_frame(struct gl_video *p, int fbo, struct frame_timing *t)
debug_check_gl(p, "after video rendering");
if (p->hwdec_active)
p->hwdec->driver->unmap_image(p->hwdec);
draw_osd:
gl->BindFramebuffer(GL_FRAMEBUFFER, fbo);