[vlc-commits] vout:gdi: use the source visible area directly
Steve Lhomme
git at videolan.org
Mon Apr 1 12:03:37 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Mar 22 13:42:03 2019 +0100| [24077b1920a216a429deaa71896f19353db9a19a] | committer: Steve Lhomme
vout:gdi: use the source visible area directly
Instead of using rect_src_clipped.
It doesn't matter if the display width/height is 0, we'll end up copying nothing.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=24077b1920a216a429deaa71896f19353db9a19a
---
modules/video_output/win32/wingdi.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/modules/video_output/win32/wingdi.c b/modules/video_output/win32/wingdi.c
index 1a64878426..ece115c72a 100644
--- a/modules/video_output/win32/wingdi.c
+++ b/modules/video_output/win32/wingdi.c
@@ -151,30 +151,29 @@ static void Display(vout_display_t *vd, picture_t *picture)
vout_display_sys_t *sys = vd->sys;
VLC_UNUSED(picture);
-#define rect_src_clipped vd->sys->sys.rect_src_clipped
-#define rect_dest vd->sys->sys.rect_dest
+#define rect_dest sys->sys.rect_dest
HDC hdc = GetDC(sys->sys.hvideownd);
SelectObject(sys->off_dc, sys->off_bitmap);
- if (RECTWidth(rect_dest) != RECTWidth(rect_src_clipped) ||
- RECTHeight(rect_dest) != RECTHeight(rect_src_clipped)) {
+ if (RECTWidth(rect_dest) != vd->source.i_visible_width ||
+ RECTHeight(rect_dest) != vd->source.i_visible_height) {
StretchBlt(hdc, 0, 0,
RECTWidth(rect_dest), RECTHeight(rect_dest),
sys->off_dc,
- rect_src_clipped.left, rect_src_clipped.top,
- rect_src_clipped.right, rect_src_clipped.bottom,
+ vd->source.i_x_offset, vd->source.i_y_offset,
+ vd->source.i_x_offset + vd->source.i_visible_width,
+ vd->source.i_y_offset + vd->source.i_visible_height,
SRCCOPY);
} else {
BitBlt(hdc, 0, 0,
RECTWidth(rect_dest), RECTHeight(rect_dest),
sys->off_dc,
- rect_src_clipped.left, rect_src_clipped.top,
+ vd->source.i_x_offset, vd->source.i_y_offset,
SRCCOPY);
}
ReleaseDC(sys->sys.hvideownd, hdc);
-#undef rect_src_clipped
#undef rect_dest
CommonManage(vd, &sys->sys);
More information about the vlc-commits
mailing list