On Thu, Oct 03, 2024 at 01:01:04PM +0000, Simon Rowe wrote:
> Looking at the trace output it seems that the displaysurface has been rounded 
> from the start
> vnc_client_connect VNC client connect state=0x556dce1c1b20 ioc=0x556dce9e1e70
> displaysurface_create_from surface=0x556dce104b30, 1360x768, format 0x20020888
> vnc_server_dpy_recreate VNC server dpy recreate dpy=0x7faa59026010 
> size=1360x768 fmt=537004168
> vnc_client_throttle_threshold VNC client throttle threshold 
> state=0x556dce1c1b20 ioc=0x556dce9e1e70 oldoffset=0 newoffset=1048576 width=0 
> height=0 bpp=0 audio=(nil)
> displaysurface_free surface=0x556dcebf10d0
> vnc_auth_start VNC client auth start state=0x556dce1c1b20 method=1
> vnc_auth_pass VNC client auth passed state=0x556dce1c1b20 method=1
> vnc_client_throttle_threshold VNC client throttle threshold 
> state=0x556dce1c1b20 ioc=0x556dce9e1e70 oldoffset=1048576 newoffset=4177920 
> width=1360 height=768 bpp=4 audio=(nil)
> displaysurface_create_from surface=0x556dce140de0, 1360x768, format 0x20020888
> vnc_server_dpy_pageflip VNC server dpy pageflip dpy=0x7faa59026010 
> size=1360x768 fmt=537004168
> displaysurface_free surface=0x556dce104b30
> vnc_client_throttle_threshold VNC client throttle threshold 
> state=0x556dce1c1b20 ioc=0x556dce9e1e70 oldoffset=4177920 newoffset=1048576 
> width=1360 height=768 bpp=1 audio=(nil)
> vnc_job_add_rect VNC add rect state=0x556dce1c1b20 job=0x556dce0ea1e0 
> offset=0,0 size=1360x768
> vnc_job_clamp_rect VNC job clamp rect state=0x7faa42de53a0 job=0x556dce0ea1e0 
> offset=0,0 size=1360x768
> vnc_job_clamped_rect VNC job clamp rect state=0x7faa42de53a0 
> job=0x556dce0ea1e0 offset=0,0 size=1360x768
> vnc_job_nrects VNC job state=0x7faa42de53a0 job=0x556dce0ea1e0 nrects=1
> vnc_client_unthrottle_forced VNC client unthrottle forced offset 
> state=0x556dce1c1b20 ioc=0x556dce9e1e70
> vnc_job_add_rect VNC add rect state=0x556dce1c1b20 job=0x556dce217810 
> offset=0,0 size=1360x13
> vnc_job_clamp_rect VNC job clamp rect state=0x7faa42de53a0 job=0x556dce217810 
> offset=0,0 size=1360x13
> vnc_job_clamped_rect VNC job clamp rect state=0x7faa42de53a0 
> job=0x556dce217810 offset=0,0 size=1360x13
> vnc_job_nrects VNC job state=0x7faa42de53a0 job=0x556dce217810 nrects=1
> vnc_client_unthrottle_forced VNC client unthrottle forced offset 
> state=0x556dce1c1b20 ioc=0x556dce9e1e70
> 
> I'm currently struggling to follow where the width parameter is taken from.

The QEMU VNC code has logic which rounds up display sizes to a multiple
of 16:

  static int vnc_width(VncDisplay *vd)
  {
      return MIN(VNC_MAX_WIDTH, ROUND_UP(surface_width(vd->ds),
                                         VNC_DIRTY_PIXELS_PER_BIT));
  }

Separately, it also tracks the "true" width, but untangling which it
uses where & the implications is hard to do. ie i'm not going to try
to explain it further, as I don't know what's going on without spending
some hours to trace through it all :-)

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Reply via email to