Commit f2582ce7 authored by Laurent Aimar's avatar Laurent Aimar

Merged vout_RenderWrapper/vout_DisplayWrapper directly into ThreadDisplayRenderPicture.

parent f22ff68e
......@@ -873,6 +873,7 @@ static int ThreadDisplayPreparePicture(vout_thread_t *vout, bool reuse, bool is_
static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
{
vout_thread_sys_t *sys = vout->p;
vout_display_t *vd = vout->p->display.vd;
picture_t *torender = picture_Hold(vout->p->displayed.current);
......@@ -955,8 +956,16 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
if (do_snapshot)
vout_snapshot_Set(&vout->p->snapshot, &vd->source, direct);
/* Render the direct buffer returned by vout_RenderPicture */
vout_RenderWrapper(vout, direct, NULL);
/* Render the direct buffer */
assert(vout_IsDisplayFiltered(vd) == !sys->display.use_dr);
vout_UpdateDisplaySourceProperties(vd, &direct->format);
if (sys->display.use_dr) {
vout_display_Prepare(vd, direct, NULL);
} else {
sys->display.filtered = vout_FilterDisplay(vd, direct);
if (sys->display.filtered)
vout_display_Prepare(vd, sys->display.filtered, NULL);
}
vout_chrono_Stop(&vout->p->render);
#if 0
......@@ -979,8 +988,11 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
/* Display the direct buffer returned by vout_RenderPicture */
vout->p->displayed.date = mdate();
vout_DisplayWrapper(vout, direct, NULL);
vout_display_Display(vd,
sys->display.filtered ? sys->display.filtered
: direct,
NULL);
sys->display.filtered = NULL;
vout_statistic_Update(&vout->p->statistic, 1, 0);
......
......@@ -161,8 +161,6 @@ void vout_CloseWrapper(vout_thread_t *, vout_display_state_t *);
int vout_InitWrapper(vout_thread_t *);
void vout_EndWrapper(vout_thread_t *);
void vout_ManageWrapper(vout_thread_t *);
void vout_RenderWrapper(vout_thread_t *, picture_t *, subpicture_t *);
void vout_DisplayWrapper(vout_thread_t *, picture_t *, subpicture_t *);
/* */
int spu_ProcessMouse(spu_t *, const vlc_mouse_t *, const video_format_t *);
......
......@@ -204,43 +204,6 @@ void vout_ManageWrapper(vout_thread_t *vout)
}
}
/*****************************************************************************
* Render
*****************************************************************************/
void vout_RenderWrapper(vout_thread_t *vout,
picture_t *picture, subpicture_t *subpicture)
{
vout_thread_sys_t *sys = vout->p;
vout_display_t *vd = sys->display.vd;
assert(vout_IsDisplayFiltered(vd) == !sys->display.use_dr);
vout_UpdateDisplaySourceProperties(vd, &picture->format);
if (sys->display.use_dr) {
vout_display_Prepare(vd, picture, subpicture);
} else {
sys->display.filtered = vout_FilterDisplay(vd, picture);
if (sys->display.filtered)
vout_display_Prepare(vd, sys->display.filtered, subpicture);
}
}
/*****************************************************************************
*
*****************************************************************************/
void vout_DisplayWrapper(vout_thread_t *vout,
picture_t *picture, subpicture_t *subpicture)
{
vout_thread_sys_t *sys = vout->p;
vout_display_t *vd = sys->display.vd;
vout_display_Display(vd,
sys->display.filtered ? sys->display.filtered
: picture,
subpicture);
sys->display.filtered = NULL;
}
#ifdef WIN32
static int Forward(vlc_object_t *object, char const *var,
vlc_value_t oldval, vlc_value_t newval, void *data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment