-
Notifications
You must be signed in to change notification settings - Fork 644
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
Conversation
I've been using the following patch to observe the impact these changes: https://gist.github.com/mike-jumper/0afd41c9fbcbc764f719890fd0dd4e3b With the above patch in place, you can set
Behavior of
|
3b6293e
to
74b1bc0
Compare
b53e369
to
76425f0
Compare
f7c95e1
to
9d59da5
Compare
9d59da5
to
05166ae
Compare
…r to be external.
…h NULL if necessary for external cleanup tasks.
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.
No longer necessary now that the last and pending frame buffers are not interleaved.
…ursor for use by terminal.
…inations to aligned boundaries.
… lock. Acquiring the read lock first and then reentrantly acquiring the write lock may result in other existing readers getting promoted to writers.
…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.
…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).
Testing doesn't seem to support an increase in throughput or responsiveness from doubling up on worker threads.
…nect after closing.
326beec
to
4220670
Compare
I misunderstood your comment in the ticket, I thought you had completely replaced the display_flush and that the problem was solved. |
…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.
8d371cf
to
f5ecb6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good to me! Let's light this candle.
This change builds off the internal
guac_common_display
andguac_common_surface
structures to create a new publicguac_display
structure and surrounding API. The approach withinguac_display
improves on that ofguac_common_surface
in several ways:guac_display
is created.rect
followed bycfill
are automatically recognized and sent out as such.guac_display
may have been.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:
Once the above is finished, I'll delete the old
guac_common_display
,guac_common_surface
, etc. and this will be ready.