GUACAMOLE-2063: Decouple render thread updates from FreeRDP GDI updates.
Doing otherwise tends to result in slower RDP updates being flushed as frames, amplifying the slowdown of those updates.
This commit is contained in:
parent
50f5b5f937
commit
fe35de5459
@ -134,7 +134,7 @@ BOOL guac_rdp_gdi_end_paint(rdpContext* context) {
|
||||
guac_rect_constrain(&dst_rect, ¤t_context->bounds);
|
||||
guac_rect_extend(¤t_context->dirty, &dst_rect);
|
||||
|
||||
guac_display_render_thread_notify_modified(rdp_client->render_thread);
|
||||
rdp_client->gdi_modified = 1;
|
||||
|
||||
paint_complete:
|
||||
|
||||
|
||||
@ -617,6 +617,13 @@ static int guac_rdp_handle_connection(guac_client* client) {
|
||||
if (!guac_rdp_handle_events(rdp_client))
|
||||
wait_result = -1;
|
||||
|
||||
/* Notify display of any changes to the GDI that may have occurred
|
||||
* while handling events/messages */
|
||||
if (rdp_client->gdi_modified) {
|
||||
guac_display_render_thread_notify_modified(rdp_client->render_thread);
|
||||
rdp_client->gdi_modified = 0;
|
||||
}
|
||||
|
||||
/* Test whether the RDP server is closing the connection */
|
||||
int connection_closing;
|
||||
#ifdef HAVE_DISCONNECT_CONTEXT
|
||||
|
||||
@ -114,6 +114,12 @@ typedef struct guac_rdp_client {
|
||||
*/
|
||||
guac_display_layer_raw_context* current_context;
|
||||
|
||||
/**
|
||||
* Whether the graphical state of FreeRDP's GDI has changed since the last
|
||||
* time a frame was sent to the client.
|
||||
*/
|
||||
int gdi_modified;
|
||||
|
||||
/**
|
||||
* The current instance of the guac_display render thread. If the thread
|
||||
* has not yet been started, this will be NULL.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user