[vlc-commits] display: remove dead display size event code

Rémi Denis-Courmont git at videolan.org
Sun May 20 19:52:09 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri May 18 21:24:29 2018 +0300| [c3f425b93f00fbbce2368c40e8c3726a382d1a63] | committer: Rémi Denis-Courmont

display: remove dead display size event code

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

 include/vlc_vout_display.h |  5 +----
 src/video_output/display.c | 39 +++------------------------------------
 2 files changed, 4 insertions(+), 40 deletions(-)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index e70a20ad8e..c6886b8ea0 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -132,8 +132,7 @@ enum {
      * after being requested externally or by VOUT_DISPLAY_WINDOW_STATE */
     VOUT_DISPLAY_CHANGE_WINDOW_STATE VLC_DEPRECATED_ENUM,   /* unsigned state */
 #endif
-    /* Ask the module to acknowledge/refuse the display size change requested
-     * (externally or by VOUT_DISPLAY_EVENT_DISPLAY_SIZE) */
+    /* Ask the module to acknowledge the display size change */
     VOUT_DISPLAY_CHANGE_DISPLAY_SIZE,   /* const vout_display_cfg_t *p_cfg */
 
     /* Ask the module to acknowledge/refuse fill display state change after
@@ -177,8 +176,6 @@ enum {
     VOUT_DISPLAY_EVENT_WINDOW_STATE,
 #endif
 
-    VOUT_DISPLAY_EVENT_DISPLAY_SIZE,        /* The display size need to change : int i_width, int i_height */
-
     /* */
     VOUT_DISPLAY_EVENT_CLOSE,
     VOUT_DISPLAY_EVENT_KEY,
diff --git a/src/video_output/display.c b/src/video_output/display.c
index e41fed8514..70cacf0c5e 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -380,10 +380,6 @@ typedef struct {
     atomic_bool reset_pictures;
 
     signed char fit_window;
-
-    bool ch_display_size;
-    int  display_width;
-    int  display_height;
 } vout_display_owner_sys_t;
 
 static int VoutDisplayCreateRender(vout_display_t *vd)
@@ -602,21 +598,6 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args)
         break;
     }
 #endif
-    case VOUT_DISPLAY_EVENT_DISPLAY_SIZE: {
-        const int width  = (int)va_arg(args, int);
-        const int height = (int)va_arg(args, int);
-        msg_Dbg(vd, "VoutDisplayEvent 'resize' %dx%d", width, height);
-
-        /* */
-        vlc_mutex_lock(&osys->lock);
-
-        osys->ch_display_size   = true;
-        osys->display_width     = width;
-        osys->display_height    = height;
-
-        vlc_mutex_unlock(&osys->lock);
-        break;
-    }
 
     case VOUT_DISPLAY_EVENT_PICTURES_INVALID: {
         msg_Warn(vd, "VoutDisplayEvent 'pictures invalid'");
@@ -683,8 +664,8 @@ bool vout_ManageDisplay(vout_display_t *vd, bool allow_reset_pictures)
 
     bool reset_render = false;
     for (;;) {
-        vlc_mutex_lock(&osys->lock);
 #if defined(_WIN32) || defined(__OS2__)
+        vlc_mutex_lock(&osys->lock);
         bool ch_fullscreen  = osys->ch_fullscreen;
         bool is_fullscreen  = osys->is_fullscreen;
         osys->ch_fullscreen = false;
@@ -692,20 +673,13 @@ bool vout_ManageDisplay(vout_display_t *vd, bool allow_reset_pictures)
         bool ch_wm_state  = osys->ch_wm_state;
         unsigned wm_state  = osys->wm_state;
         osys->ch_wm_state = false;
-#endif
-
-        bool ch_display_size       = osys->ch_display_size;
-        int  display_width         = osys->display_width;
-        int  display_height        = osys->display_height;
-        osys->ch_display_size = false;
-
         vlc_mutex_unlock(&osys->lock);
+#endif
 
         bool reset_pictures = allow_reset_pictures
             && atomic_exchange(&osys->reset_pictures, false);
 
-        if (!ch_display_size &&
-            !reset_pictures &&
+        if (!reset_pictures &&
             osys->is_display_filled == osys->cfg.is_display_filled &&
             !osys->ch_zoom &&
 #if defined(_WIN32) || defined(__OS2__)
@@ -741,10 +715,6 @@ bool vout_ManageDisplay(vout_display_t *vd, bool allow_reset_pictures)
 #endif
 
         /* */
-        if (ch_display_size)
-            vout_SetDisplaySize(vd, display_width, display_height);
-
-        /* */
         if (osys->is_display_filled != osys->cfg.is_display_filled) {
             osys->cfg.is_display_filled = osys->is_display_filled;
 
@@ -1057,8 +1027,6 @@ static vout_display_t *DisplayNew(vout_thread_t *vout,
     vlc_mutex_init(&osys->lock);
 
     vlc_mouse_Init(&osys->mouse.state);
-    osys->display_width  = cfg->display.width;
-    osys->display_height = cfg->display.height;
     osys->is_display_filled = cfg->is_display_filled;
     osys->viewpoint      = cfg->viewpoint;
 
@@ -1190,7 +1158,6 @@ static void SplitterEvent(vout_display_t *vd, int event, va_list args)
     case VOUT_DISPLAY_EVENT_MOUSE_DOUBLE_CLICK:
     case VOUT_DISPLAY_EVENT_KEY:
     case VOUT_DISPLAY_EVENT_CLOSE:
-    case VOUT_DISPLAY_EVENT_DISPLAY_SIZE:
     case VOUT_DISPLAY_EVENT_PICTURES_INVALID:
         VoutDisplayEvent(vd, event, args);
         break;



More information about the vlc-commits mailing list