[vlc-commits] [Git][videolan/vlc][master] 2 commits: opengl: only resize the output when the display size changed

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Feb 2 09:24:10 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
cdd23419 by Steve Lhomme at 2024-02-02T08:55:27+00:00
opengl: only resize the output when the display size changed

The call is useless otherwise. We can do the placement before or after,
because the result is handled asynchronously.

- - - - -
073ed9d4 by Steve Lhomme at 2024-02-02T08:55:27+00:00
android: only resize the subpicture output when the display size changed

The call is useless otherwise. We can do the placement before or after,
because the result is handled asynchronously.

- - - - -


2 changed files:

- modules/video_output/android/display.c
- modules/video_output/opengl/display.c


Changes:

=====================================
modules/video_output/android/display.c
=====================================
@@ -93,6 +93,8 @@ static int subpicture_Control(vout_display_t *vd, int query)
     switch (query)
     {
     case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
+        vlc_gl_Resize(sub->gl, vd->cfg->display.width, vd->cfg->display.height);
+        // fallthrough
     case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
     case VOUT_DISPLAY_CHANGE_ZOOM:
     {
@@ -101,7 +103,6 @@ static int subpicture_Control(vout_display_t *vd, int query)
         FlipVerticalAlign(&dp);
         vout_display_PlacePicture(&sub->place, vd->source, &dp);
         sub->place_changed = true;
-        vlc_gl_Resize(sub->gl, dp.width, dp.height);
         return VLC_SUCCESS;
     }
 


=====================================
modules/video_output/opengl/display.c
=====================================
@@ -333,17 +333,10 @@ static int Control (vout_display_t *vd, int query)
     {
 
       case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
+        vlc_gl_Resize (sys->gl, vd->cfg->display.width, vd->cfg->display.height);
+        // fallthrough
       case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
       case VOUT_DISPLAY_CHANGE_ZOOM:
-      {
-        struct vout_display_placement dp = vd->cfg->display;
-
-        PlacePicture(vd, &sys->place, dp);
-        sys->place_changed = true;
-        vlc_gl_Resize (sys->gl, dp.width, dp.height);
-        return VLC_SUCCESS;
-      }
-
       case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
       case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
       {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/0449bae03057e3a1abf3f7ef35161f6e34495e52...073ed9d4d46146c6edaf3d232b8d5248835f4020

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/0449bae03057e3a1abf3f7ef35161f6e34495e52...073ed9d4d46146c6edaf3d232b8d5248835f4020
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