Commit 475cfb41 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

video_output:win32: remove the video_format_t parameter

It's always vd->source.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 6f3e79d1
......@@ -145,10 +145,10 @@ picture_pool_t *CommonPool(vout_display_t *vd, unsigned count)
*****************************************************************************/
void UpdateRects(vout_display_t *vd,
const vout_display_cfg_t *cfg,
const video_format_t *source,
bool is_forced)
{
vout_display_sys_t *sys = vd->sys;
const video_format_t *source = &vd->source;
#define rect_src sys->rect_src
#define rect_src_clipped sys->rect_src_clipped
#define rect_dest sys->rect_dest
......@@ -160,8 +160,6 @@ void UpdateRects(vout_display_t *vd,
/* */
if (!cfg)
cfg = vd->cfg;
if (!source)
source = &vd->source;
/* Retrieve the window size */
if (!sys->pf_GetRect(sys, &rect))
......@@ -406,13 +404,13 @@ void CommonManage(vout_display_t *vd)
rect_parent.bottom - rect_parent.top,
SWP_NOZORDER);
UpdateRects(vd, NULL, NULL, true);
UpdateRects(vd, NULL, true);
}
}
/* HasMoved means here resize or move */
if (EventThreadGetAndResetHasMoved(sys->event))
UpdateRects(vd, NULL, NULL, false);
UpdateRects(vd, NULL, false);
}
/**
......@@ -638,7 +636,7 @@ static void RestoreScreensaver(vout_display_t *vd)
#else
void CommonManage(vout_display_t *vd) {
UpdateRects(vd, NULL, NULL, false);
UpdateRects(vd, NULL, false);
}
void CommonClean(vout_display_t *vd) {}
void CommonDisplay(vout_display_t *vd) {}
......@@ -662,7 +660,7 @@ int CommonControl(vout_display_t *vd, int query, va_list args)
} else {
cfg = va_arg(args, const vout_display_cfg_t *);
}
UpdateRects(vd, cfg, NULL, true);
UpdateRects(vd, cfg, true);
return VLC_SUCCESS;
}
#if !VLC_WINSTORE_APP
......@@ -682,7 +680,7 @@ int CommonControl(vout_display_t *vd, int query, va_list args)
rect_window.right - rect_window.left,
rect_window.bottom - rect_window.top, SWP_NOMOVE);
}
UpdateRects(vd, cfg, NULL, false);
UpdateRects(vd, cfg, false);
return VLC_SUCCESS;
}
case VOUT_DISPLAY_CHANGE_WINDOW_STATE: { /* unsigned state */
......@@ -708,7 +706,7 @@ int CommonControl(vout_display_t *vd, int query, va_list args)
bool fs = va_arg(args, int);
if (CommonControlSetFullscreen(vd, fs))
return VLC_EGENERIC;
UpdateRects(vd, NULL, NULL, false);
UpdateRects(vd, NULL, false);
return VLC_SUCCESS;
}
......
......@@ -98,7 +98,6 @@ int CommonUpdatePicture(picture_t *, picture_t **fallback, uint8_t *plane, unsi
void UpdateRects (vout_display_t *,
const vout_display_cfg_t *,
const video_format_t *,
bool is_forced);
void AlignRect(RECT *, int align_boundary, int align_size);
......
......@@ -1168,7 +1168,7 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
sys->picQuad.i_width = texDesc.Width;
BEFORE_UPDATE_RECTS;
UpdateRects(vd, NULL, NULL, true);
UpdateRects(vd, NULL, true);
AFTER_UPDATE_RECTS;
UpdateSize(vd);
}
......@@ -1652,7 +1652,7 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
}
BEFORE_UPDATE_RECTS;
UpdateRects(vd, NULL, NULL, true);
UpdateRects(vd, NULL, true);
AFTER_UPDATE_RECTS;
#if defined(HAVE_ID3D11VIDEODECODER)
......
......@@ -937,7 +937,7 @@ static int Direct3D9Open(vout_display_t *vd, video_format_t *fmt)
return VLC_EGENERIC;
}
UpdateRects(vd, NULL, NULL, true);
UpdateRects(vd, NULL, true);
if (Direct3D9CreateResources(vd, fmt)) {
msg_Err(vd, "Failed to allocate resources");
......@@ -993,7 +993,7 @@ static int Direct3D9Reset(vout_display_t *vd)
return VLC_EGENERIC;
}
UpdateRects(vd, NULL, NULL, true);
UpdateRects(vd, NULL, true);
/* re-create them */
if (Direct3D9CreateResources(vd, &vd->fmt)) {
......
......@@ -441,7 +441,7 @@ static int DirectXOpen(vout_display_t *vd, video_format_t *fmt)
msg_Err(vd, "cannot initialize DirectX DirectDraw");
return VLC_EGENERIC;
}
UpdateRects(vd, NULL, NULL, true);
UpdateRects(vd, NULL, true);
/* Create the picture pool */
if (DirectXCreatePool(vd, &sys->sys.use_overlay, fmt)) {
......
......@@ -314,7 +314,7 @@ static int Init(vout_display_t *vd,
else
sys->sys.pool = NULL;
UpdateRects(vd, NULL, NULL, true);
UpdateRects(vd, NULL, true);
return VLC_SUCCESS;
}
......
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