[vlc-commits] vout:win32: rename UpdateRects into CommonPlacePicture
Steve Lhomme
git at videolan.org
Tue May 7 12:01:08 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Apr 24 08:10:37 2019 +0200| [f6f6f582a41026acd91a89b37ed6dbedf3053119] | committer: Steve Lhomme
vout:win32: rename UpdateRects into CommonPlacePicture
That's pretty much all it does now and it's more explicit in each module when
we place the picture after some dimension changed.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f6f6f582a41026acd91a89b37ed6dbedf3053119
---
modules/video_output/win32/common.c | 6 +++---
modules/video_output/win32/common.h | 2 +-
modules/video_output/win32/direct3d11.c | 16 ++++++++--------
modules/video_output/win32/direct3d9.c | 4 ++--
modules/video_output/win32/wingdi.c | 2 +-
5 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 4e9e5b2bc1..894091b340 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -101,7 +101,7 @@ int CommonInit(vlc_object_t *obj, display_win32_area_t *area,
* its job is to update the source and destination RECTs used to display the
* picture.
*****************************************************************************/
-void UpdateRects(vlc_object_t *obj, display_win32_area_t *area, vout_display_sys_win32_t *sys)
+void CommonPlacePicture(vlc_object_t *obj, display_win32_area_t *area, vout_display_sys_win32_t *sys)
{
/* Update the window position and size */
vout_display_cfg_t place_cfg = area->vdcfg;
@@ -206,7 +206,7 @@ int CommonControl(vlc_object_t *obj, display_win32_area_t *area, vout_display_sy
case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
case VOUT_DISPLAY_CHANGE_SOURCE_CROP: {
area->vdcfg = *va_arg(args, const vout_display_cfg_t *);
- UpdateRects(obj, area, sys);
+ CommonPlacePicture(obj, area, sys);
return VLC_SUCCESS;
}
case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: /* const vout_display_cfg_t *p_cfg */
@@ -225,7 +225,7 @@ int CommonControl(vlc_object_t *obj, display_win32_area_t *area, vout_display_sy
area->vdcfg.display.height, SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE);
}
#endif /* !VLC_WINSTORE_APP */
- UpdateRects(obj, area, sys);
+ CommonPlacePicture(obj, area, sys);
return VLC_SUCCESS;
}
diff --git a/modules/video_output/win32/common.h b/modules/video_output/win32/common.h
index e2d928a05a..d54b49147c 100644
--- a/modules/video_output/win32/common.h
+++ b/modules/video_output/win32/common.h
@@ -75,7 +75,7 @@ void CommonClean(vlc_object_t *, vout_display_sys_win32_t *);
#endif /* !VLC_WINSTORE_APP */
int CommonControl(vlc_object_t *, display_win32_area_t *, vout_display_sys_win32_t *, int , va_list );
-void UpdateRects (vlc_object_t *, display_win32_area_t *, vout_display_sys_win32_t *);
+void CommonPlacePicture (vlc_object_t *, display_win32_area_t *, vout_display_sys_win32_t *);
void InitArea(vout_display_t *, display_win32_area_t *, const vout_display_cfg_t *);
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index fa45efb9f8..6b47c0ca0e 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -384,7 +384,7 @@ static void Swap( void *opaque )
}
static int SetupWindowLessOutput(vout_display_t *vd)
-{
+{
vout_display_sys_t *sys = vd->sys;
DXGI_FORMAT windowlessFormat = DXGI_FORMAT_R8G8B8A8_UNORM;
@@ -399,25 +399,25 @@ static int SetupWindowLessOutput(vout_display_t *vd)
if (FAILED(IDXGISwapChain1_GetDesc(dxgiswapChain, &scd)))
return VLC_EGENERIC;
-
+
windowlessFormat = scd.Format;
#endif /* VLC_WINSTORE_APP */
for (const d3d_format_t *output_format = GetRenderFormatList();
output_format->name != NULL; ++output_format)
- {
+ {
if (output_format->formatTexture == windowlessFormat &&
!is_d3d11_opaque(output_format->fourcc))
{
sys->display.pixelFormat = output_format;
break;
}
- }
+ }
if (unlikely(sys->display.pixelFormat == NULL)) {
msg_Err(vd, "Could not setup the output format.");
return VLC_EGENERIC;
}
return VLC_SUCCESS;
-}
+}
static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
video_format_t *fmtp, vlc_video_context *context)
@@ -816,7 +816,7 @@ static void PreparePicture(vout_display_t *vd, picture_t *picture, subpicture_t
sys->area.texture_source.i_width = sys->picQuad.i_height = texDesc.Height;
sys->area.texture_source.i_height = sys->picQuad.i_width = texDesc.Width;
- UpdateRects(VLC_OBJECT(vd), &sys->area, &sys->sys);
+ CommonPlacePicture(VLC_OBJECT(vd), &sys->area, &sys->sys);
UpdateSize(vd);
}
}
@@ -1455,7 +1455,7 @@ static int Direct3D11CreateFormatResources(vout_display_t *vd, const video_forma
sys->area.texture_source.i_width = sys->picQuad.i_width;
sys->area.texture_source.i_height = sys->picQuad.i_height;
- UpdateRects(VLC_OBJECT(vd), &sys->area, &sys->sys);
+ CommonPlacePicture(VLC_OBJECT(vd), &sys->area, &sys->sys);
if (D3D11_AllocateQuad(vd, &sys->d3d_dev, vd->source.projection_mode, &sys->picQuad) != VLC_SUCCESS)
{
@@ -1561,7 +1561,7 @@ static int Direct3D11CreateGenericResources(vout_display_t *vd)
ID3D11DepthStencilState_Release(pDepthStencilState);
}
- UpdateRects(VLC_OBJECT(vd), &sys->area, &sys->sys);
+ CommonPlacePicture(VLC_OBJECT(vd), &sys->area, &sys->sys);
hr = UpdateBackBuffer(vd);
if (FAILED(hr)) {
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 4586973f4e..cee298fa00 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -915,7 +915,7 @@ static int Direct3D9Reset(vout_display_t *vd, video_format_t *fmtp)
return VLC_EGENERIC;
}
- UpdateRects(VLC_OBJECT(vd), &sys->area, &sys->sys);
+ CommonPlacePicture(VLC_OBJECT(vd), &sys->area, &sys->sys);
/* re-create them */
if (Direct3D9CreateResources(vd, fmtp)) {
@@ -1494,7 +1494,7 @@ static int Direct3D9Open(vout_display_t *vd, video_format_t *fmt,
fmt->i_bmask = d3dfmt->bmask;
sys->sw_texture_fmt = d3dfmt;
- UpdateRects(VLC_OBJECT(vd), &sys->area, &sys->sys);
+ CommonPlacePicture(VLC_OBJECT(vd), &sys->area, &sys->sys);
if (Direct3D9CreateResources(vd, fmt)) {
msg_Err(vd, "Failed to allocate resources");
diff --git a/modules/video_output/win32/wingdi.c b/modules/video_output/win32/wingdi.c
index 7f387c9d24..cde6cdc044 100644
--- a/modules/video_output/win32/wingdi.c
+++ b/modules/video_output/win32/wingdi.c
@@ -274,7 +274,7 @@ static int Init(vout_display_t *vd, video_format_t *fmt)
vout_window_SetTitle(sys->area.vdcfg.window, VOUT_TITLE " (WinGDI output)");
- UpdateRects(VLC_OBJECT(vd), &sys->area, &sys->sys);
+ CommonPlacePicture(VLC_OBJECT(vd), &sys->area, &sys->sys);
return VLC_SUCCESS;
}
More information about the vlc-commits
mailing list