Merge 1.6.0 changes to patch.
This commit is contained in:
commit
551d67cd59
@ -141,9 +141,10 @@ static void* guac_display_render_loop(void* data) {
|
||||
}
|
||||
|
||||
/* Use explicit frame boundaries whenever available */
|
||||
if (render_thread->state.value & GUAC_DISPLAY_RENDER_THREAD_STATE_FRAME_READY) {
|
||||
if (guac_flag_timedwait_and_lock(&render_thread->state,
|
||||
GUAC_DISPLAY_RENDER_THREAD_STATE_FRAME_READY, 0)) {
|
||||
|
||||
rendered_frames = render_thread->frames;
|
||||
rendered_frames += render_thread->frames;
|
||||
render_thread->frames = 0;
|
||||
|
||||
guac_flag_clear(&render_thread->state,
|
||||
|
||||
@ -139,6 +139,17 @@ int guac_flag_timedwait_and_lock(guac_flag* event_flag,
|
||||
|
||||
guac_flag_lock(event_flag);
|
||||
|
||||
/* Short path: skip wait completely when possible */
|
||||
if (!msec_timeout) {
|
||||
|
||||
int retval = event_flag->value & flags;
|
||||
if (!retval)
|
||||
guac_flag_unlock(event_flag);
|
||||
|
||||
return retval;
|
||||
|
||||
}
|
||||
|
||||
struct timespec ts_timeout;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts_timeout);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user