[vlc-devel] [PATCH 29/41] direct3d11: no need to check if the source visible area changed

Steve Lhomme robux4 at ycbcr.xyz
Fri Mar 22 16:14:07 CET 2019


The vout should be reopened with the source changes. And even if it doesn't
the output rectangle will likely change.
---
 modules/video_output/win32/direct3d11.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 7156d82872..0d52e935a0 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -227,13 +227,11 @@ static void UpdateSize(vout_display_t *vd)
 static void Manage(vout_display_t *vd)
 {
     vout_display_sys_t *sys = vd->sys;
-    RECT before_visible_src  = sys->sys.area.source_visible_rect;
-    RECT before_dest         = sys->sys.area.rect_dest;
+    RECT before_dest = sys->sys.area.rect_dest;
 
     CommonManage(vd, &sys->sys);
 
-    if (!RectEquals(&before_visible_src, &sys->sys.area.source_visible_rect) ||
-        !RectEquals(&before_dest, &sys->sys.area.rect_dest))
+    if (!RectEquals(&before_dest, &sys->sys.area.rect_dest))
     {
         UpdateSize(vd);
     }
@@ -757,8 +755,7 @@ static void SetQuadVSProjection(vout_display_t *vd, d3d_quad_t *quad, const vlc_
 static int Control(vout_display_t *vd, int query, va_list args)
 {
     vout_display_sys_t *sys = vd->sys;
-    RECT before_visible_src  = sys->sys.area.source_visible_rect;
-    RECT before_dest         = sys->sys.area.rect_dest;
+    RECT before_dest = sys->sys.area.rect_dest;
 
     int res = CommonControl( vd, &sys->sys, query, args );
 
@@ -772,8 +769,7 @@ static int Control(vout_display_t *vd, int query, va_list args)
         }
     }
 
-    if (!RectEquals(&before_visible_src,  &sys->sys.area.source_visible_rect) ||
-        !RectEquals(&before_dest,         &sys->sys.area.rect_dest) )
+    if (!RectEquals(&before_dest, &sys->sys.area.rect_dest) )
     {
         UpdateSize(vd);
     }
-- 
2.17.1



More information about the vlc-devel mailing list