mike-jumper opened a new pull request, #525:
URL: https://github.com/apache/guacamole-server/pull/525

   This change builds off the internal `guac_common_display` and 
`guac_common_surface` structures to create a new public `guac_display` 
structure and surrounding API. The approach within `guac_display` improves on 
that of `guac_common_surface` in several ways:
   
   * It makes use of a pool of worker threads to parallelize the encoding 
process. The appropriate number of worker threads is detected automatically 
when the `guac_display` is created.
   * **Changes due to scrolling, etc. are automatically detected in real time** 
using a combination of a hash table, a hash function designed to avoid 
inefficient memory traversal, and a 2D variant of 
[Rabin-Karp](https://en.m.wikipedia.org/wiki/Rabin%E2%80%93Karp_algorithm). 
Such drawing operations are automatically transformed into copy operations.
   * Changes that can be represented as a simple `rect` followed by `cfill` are 
automatically recognized and sent out as such.
   * Dirty rectangles covering the changes made to the display are 
automatically broken up and tightened to more efficiently represent the actual 
changes made, regardless of how large the dirty rectangle submitted to 
`guac_display` may have been.
   * Adjustment for client-side processing lag is handled automatically.
   * Encoding of images for a previous frame happens asynchronously while the 
next frame is being assembled, reducing latency.
   * Any number of additional frames may be assembled while waiting for the 
previous frame to encode. If a previous frame is still being encoded, further 
frames are combined together into a pending frame that will be flushed when 
encoding is complete.
   
   With these changes, you can now throw virtually anything at the display and 
it will magically get decomposed into an efficient combination of copies, 
draws, and rectangles, even if the information regarding the nature of those 
updates is unavailable (ie: RDPGFX and SPICE).
   
   Metrics covering rendering and optimization performance of `guac_display` 
are logged at the "trace" level.
   
   I'm opening this as a draft for now, as these changes are currently 
incomplete:
   
   * Only VNC has been migrated to the new API, and then only partially.
   * I suspect that the internals of the terminal emulator can be simplified, 
given that scrolling is now automatically detected.
   * I have not yet added a mechanism for callers to "hint" that a change is 
due to a copy (this will be necessary for handling RDP's bitmap cache).
   
   Once the above is finished, I'll delete the old `guac_common_display`, 
`guac_common_surface`, etc. and this will be ready.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to