Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUACAMOLE-377: Add libguac "guac_display" API for easy and efficient rendering. #525

Merged
merged 53 commits into from
Sep 29, 2024

Commits on Sep 28, 2024

  1. GUACAMOLE-377: Establish public guac_display API for efficient render…

    …ing via Guacamole protocol.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    104006c View commit details
    Browse the repository at this point in the history
  2. GUACAMOLE-377: Tighten dirty rects down to the individual pixel, rath…

    …er than whole 64-pixel lines.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    028fb58 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5814072 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b965c4d View commit details
    Browse the repository at this point in the history
  5. GUACAMOLE-377: Correct logic and lock order around deferred frame flu…

    …shing (caused deadlock).
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    619eb2e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f898ead View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    442b33e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e396ed5 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    8afbeae View commit details
    Browse the repository at this point in the history
  10. GUACAMOLE-377: Flush an automatic frame for mouse changes only if the…

    …re are no other graphical changes pending.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    692400c View commit details
    Browse the repository at this point in the history
  11. GUACAMOLE-377: Updates to cursor must occur within the boundary of th…

    …eir relevant frame (before "sync").
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    335d5e2 View commit details
    Browse the repository at this point in the history
  12. GUACAMOLE-377: Ensure all layers supporting transparency are properly…

    … cleared before receiving data that also supports transparency (including WebP).
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    15e400e View commit details
    Browse the repository at this point in the history
  13. GUACAMOLE-377: Add ability to "hint" that a drawing operation copied …

    …data from another layer.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    4f3fccd View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    c994b2e View commit details
    Browse the repository at this point in the history
  15. GUACAMOLE-377: Do not use threaded WebP encoder given that guac_displ…

    …ay will already make use of a worker thread pool.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    63ecfd8 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    d644722 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    b030ced View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    3f88d3e View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    d99c5c0 View commit details
    Browse the repository at this point in the history
  20. GUACAMOLE-377: Use FreeRDP's built-in GDI handling of bitmap cache.

    With FreeRDP's GDI being used for ther other aspects of RDP drawing,
    using our own implementation of bitmap caching causes the FreeRDP's GDI
    to become out-of-sync with Guacamole's representation, producing
    graphical artifacts. We can't simply monkey-patch the GDI, as the
    functions used are internal and not part of the public FreeRDP API.
    
    There are likely other possible approaches, like manually updating
    FreeRDP's GDI surface in addition to Guacamole's surface, but this may
    not be worth the effort given that bitmap caching is not commonly used
    by modern RDP servers.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    28687cb View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    1f0a365 View commit details
    Browse the repository at this point in the history
  22. GUACAMOLE-377: Work around libssh2 usage of strlen() on key data (oth…

    …erwise encumbering testing of terminal emulator refactor).
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    3b6173f View commit details
    Browse the repository at this point in the history
  23. GUACAMOLE-377: Increase maximum number of streams.

    The new guac_display otherwise tends to run out of outbound, client-wide
    streams.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    40eef95 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    dc133ea View commit details
    Browse the repository at this point in the history
  25. GUACAMOLE-377: Correct return value confusion in handling of timeout …

    …vs. general failure of WaitForMultipleObjects().
    
    The conversion of WAIT_FAILED to a signed int and back may cause the
    value of result to not actually match the value of the WAIT_FAILED macro
    due to the difference in size and sign extension during conversion.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    ba5511c View commit details
    Browse the repository at this point in the history
  26. GUACAMOLE-377: Prefer GUAC_COMP_OVER to GUAC_COMP_SRC for performance…

    …-critical operations (~3x faster).
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    c48409c View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    de30928 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    8003836 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    3aae603 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    7e593c0 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    dc833c7 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    cbfeae6 View commit details
    Browse the repository at this point in the history
  33. GUACAMOLE-377: Allow external guac_display buffers to be replaced wit…

    …h NULL if necessary for external cleanup tasks.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    fa37f00 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    d31a96c View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    b667f69 View commit details
    Browse the repository at this point in the history
  36. GUACAMOLE-377: Wrap all VNC message handling within drawing context.

    It is otherwise difficult to guarantee that all operations touching the
    pending frame buffer will occur while holding an open raw context,
    resulting in unstable behavior.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    6a7eb6d View commit details
    Browse the repository at this point in the history
  37. GUACAMOLE-377: Remove unnecessary locking of last frame during resize.

    No longer necessary now that the last and pending frame buffers are not
    interleaved.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    8c341bc View commit details
    Browse the repository at this point in the history
  38. GUACAMOLE-377: Restore good ol' guac_common_surface and guac_common_c…

    …ursor for use by terminal.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    ae52278 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    4145f58 View commit details
    Browse the repository at this point in the history
  40. GUACAMOLE-377: Make vertical combination more likely by limiting comb…

    …inations to aligned boundaries.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    c6833a4 View commit details
    Browse the repository at this point in the history
  41. GUACAMOLE-377: Read lock should NOT be acquired at same time as write…

    … lock.
    
    Acquiring the read lock first and then reentrantly acquiring the write
    lock may result in other existing readers getting promoted to writers.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    540d204 View commit details
    Browse the repository at this point in the history
  42. GUACAMOLE-377: Do NOT combine display operations vertically unless ed…

    …ges match exactly.
    
    Doing otherwise can result in display operations overlapping. This is
    because combining two vertically adjacent operations that have different
    widths causes additional cells to be included that are not covered by
    either original operation. If other operations are within those
    additional cells, then the operations flushed for the frame will
    overlap, consuming unnecessary additional processing and bandwidth.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    f348506 View commit details
    Browse the repository at this point in the history
  43. GUACAMOLE-377: Do not allow "img" instructions to break "rect" and "c…

    …fill" pairs.
    
    Other instructions that occur between "rect" and "cfill" may disrupt the
    path set by "rect", resulting in "cfill" having no effect, resulting in
    graphical artifacts.
    
    This also has the side effect of reducing thread contention by flushing
    the simple operations early (it is now less likely that multiple worker
    threads will be free for further tasks at nearly exactly the same time).
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    5ec7be1 View commit details
    Browse the repository at this point in the history
  44. GUACAMOLE-377: Reduce number of worker threads to one per processor.

    Testing doesn't seem to support an increase in throughput or
    responsiveness from doubling up on worker threads.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    260f959 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    8f5c3e9 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    f2f74c2 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    0da3354 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    98fd5e6 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    5a12d96 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    db42844 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    ed38863 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    4220670 View commit details
    Browse the repository at this point in the history
  53. GUACAMOLE-377: Stream/object sentinel must be assigned BEFORE returni…

    …ng index to pool.
    
    Doing otherwise results in a race condition where the index of a valid
    stream is changed to -1 by a different thread, breaking assertions and
    causing the connection to disconnect.
    mike-jumper committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    f5ecb6c View commit details
    Browse the repository at this point in the history