[vlc-commits] direct3d11: no need to check if the source visible area changed

Steve Lhomme git at videolan.org
Mon Apr 1 12:03:40 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Mar 22 13:55:42 2019 +0100| [ade23f73cd5d9abf3cb7bf53de53406115369f50] | committer: Steve Lhomme

direct3d11: no need to check if the source visible area changed

The vout should be reopened with the source changes. And even if it doesn't
the output rectangle will likely change.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ade23f73cd5d9abf3cb7bf53de53406115369f50
---

 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 8e566cd26f..97617535bd 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -230,13 +230,11 @@ static void UpdateSize(vout_display_t *vd)
 static void Manage(vout_display_t *vd)
 {
     vout_display_sys_t *sys = vd->sys;
-    RECT before_src_clipped  = sys->sys.rect_src_clipped;
-    RECT before_dest         = sys->sys.rect_dest;
+    RECT before_dest = sys->sys.rect_dest;
 
     CommonManage(vd, &sys->sys);
 
-    if (!RectEquals(&before_src_clipped, &sys->sys.rect_src_clipped) ||
-        !RectEquals(&before_dest, &sys->sys.rect_dest))
+    if (!RectEquals(&before_dest, &sys->sys.rect_dest))
     {
         UpdateSize(vd);
     }
@@ -764,8 +762,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_src_clipped  = sys->sys.rect_src_clipped;
-    RECT before_dest         = sys->sys.rect_dest;
+    RECT before_dest = sys->sys.rect_dest;
 
     int res = CommonControl( vd, &sys->sys, query, args );
 
@@ -779,8 +776,7 @@ static int Control(vout_display_t *vd, int query, va_list args)
         }
     }
 
-    if (!RectEquals(&before_src_clipped,  &sys->sys.rect_src_clipped) ||
-        !RectEquals(&before_dest,         &sys->sys.rect_dest) )
+    if (!RectEquals(&before_dest, &sys->sys.rect_dest) )
     {
         UpdateSize(vd);
     }



More information about the vlc-commits mailing list