[vlc-commits] [Git][videolan/vlc][master] 3 commits: wingdi: remove initial size_changed set to true

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Oct 9 07:48:12 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
6c0e1868 by Steve Lhomme at 2025-10-09T07:29:04+00:00
wingdi: remove initial size_changed set to true

Init calls ChangeSize() so we don't need to do it again later.

- - - - -
4ba9a507 by Steve Lhomme at 2025-10-09T07:29:04+00:00
wingdi: remove always false size_changed

On placement change we also fill the whole display in black to avoid
retaining old placement pixels.

- - - - -
01076eee by Steve Lhomme at 2025-10-09T07:29:04+00:00
wingdi: use initial placement on module opening

We don't need to wait for the first Prepare() call do to it.

- - - - -


1 changed file:

- modules/video_output/win32/wingdi.c


Changes:

=====================================
modules/video_output/win32/wingdi.c
=====================================
@@ -60,7 +60,6 @@ vlc_module_end ()
 typedef struct vout_display_sys_t
 {
     struct event_thread_t    *video_wnd;
-    bool                     size_changed;
     bool                     place_changed;
 
     /* Our offscreen bitmap and its framebuffer */
@@ -130,22 +129,19 @@ static void Prepare(vout_display_t *vd, picture_t *picture,
     VLC_UNUSED(date);
     vout_display_sys_t *sys = vd->sys;
 
-    if (sys->place_changed || sys->size_changed)
+    if (sys->place_changed)
     {
         bool err = false;
         HWND hwnd = CommonVideoHWND(sys->video_wnd);
         HDC hdc = GetDC(hwnd);
-        if (sys->size_changed)
-            err |= ChangeSize(vd, hdc);
-        if (sys->place_changed)
-            err |= ChangePlace(vd, hdc);
+        err |= ChangeSize(vd, hdc);
+        err |= ChangePlace(vd, hdc);
         ReleaseDC(hwnd, hdc);
 
         if (unlikely(err))
             return;
 
         sys->place_changed = false;
-        sys->size_changed = false;
     }
 
     assert((LONG)picture->format.i_visible_width  == sys->bmiInfo.bmiHeader.biWidth &&
@@ -198,8 +194,6 @@ static int Open(vout_display_t *vd,
     if (!sys)
         return VLC_ENOMEM;
 
-    sys->size_changed = true;
-    sys->place_changed = true;
     if (CommonWindowInit(vd, &sys->video_wnd, false))
         goto error;
 
@@ -318,6 +312,8 @@ static int Init(vout_display_t *vd, video_format_t *fmt)
     sys->off_dc = CreateCompatibleDC(window_dc);
 
     int err = ChangeSize(vd, window_dc);
+    if (err == VLC_SUCCESS)
+        err = ChangePlace(vd, window_dc);
     if (err != VLC_SUCCESS)
         DeleteDC(sys->off_dc);
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/adcf4aff3ce4863b5adde5d301251fb7b565851a...01076eeeb2b7d7692d87dc3a78db587ee5043fd5

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/adcf4aff3ce4863b5adde5d301251fb7b565851a...01076eeeb2b7d7692d87dc3a78db587ee5043fd5
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list