Merge main branch changes to next.
This commit is contained in:
commit
b502b904e2
@ -38,6 +38,7 @@
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <pthread.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -546,6 +547,12 @@ int main(int argc, char* argv[]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Set TCP_NODELAY to avoid any latency that would otherwise be added by the OS'
|
||||
* networking stack and Nagle's algorithm */
|
||||
const int SO_TRUE = 1;
|
||||
setsockopt(connected_socket_fd, IPPROTO_TCP, TCP_NODELAY,
|
||||
(const void*) &SO_TRUE, sizeof(SO_TRUE));
|
||||
|
||||
/* Create parameters for connection thread */
|
||||
guacd_connection_thread_params* params = guac_mem_alloc(sizeof(guacd_connection_thread_params));
|
||||
if (params == NULL) {
|
||||
|
||||
@ -176,6 +176,12 @@ static int PFW_LFW_guac_display_frame_complete(guac_display* display) {
|
||||
|
||||
}
|
||||
|
||||
/* Even if nothing has changed in the pending frame, we have to at
|
||||
* least flush that fact to the last frame (otherwise, the last frame
|
||||
* may contain stale dirty rects) */
|
||||
else
|
||||
current->last_frame.dirty = (guac_rect) { 0 };
|
||||
|
||||
/* Commit any change in layer size */
|
||||
if (current->pending_frame.width != current->last_frame.width
|
||||
|| current->pending_frame.height != current->last_frame.height) {
|
||||
@ -272,7 +278,9 @@ static int PFW_LFW_guac_display_frame_complete(guac_display* display) {
|
||||
display->last_frame.cursor_mask = display->pending_frame.cursor_mask;
|
||||
guac_client_foreach_user(client, LFR_guac_display_broadcast_cursor_state, display);
|
||||
|
||||
retval = 1;
|
||||
/* NOTE: We DO NOT set retval here, as flushing a frame due purely to
|
||||
* mouse position changes can cause slowdowns apparently from the sheer
|
||||
* quantity of frames */
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -454,10 +454,6 @@ void* guac_display_worker_thread(void* data) {
|
||||
|
||||
}
|
||||
|
||||
/* Include an additional frame boundary to allow the client to also move forward with committing
|
||||
* changes to the backing buffer while the server is receiving and preparing the next frame */
|
||||
guac_client_end_multiple_frames(client, 0);
|
||||
|
||||
/* This is now absolutely everything for the current frame,
|
||||
* and it's safe to flush any outstanding data */
|
||||
guac_socket_flush(client->socket);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user