Make frame synchronization conditional on clock_gettime
* src/xfns.c (x_set_parent_frame) (x_set_use_frame_synchronization): * src/xterm.c (x_update_begin, show_back_buffer, x_update_end) (x_display_set_last_user_time, handle_one_xevent): * src/xterm.h (struct x_output): Define out vsync code when !HAVE_CLOCK_GETTIME.
This commit is contained in:
parent
b448fbec4b
commit
3b7fb723e6
3 changed files with 10 additions and 10 deletions
|
@ -965,7 +965,7 @@ x_set_parent_frame (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined HAVE_XSYNC && !defined USE_GTK
|
#if defined HAVE_XSYNC && !defined USE_GTK && defined HAVE_CLOCK_GETTIME
|
||||||
/* Frame synchronization can't be used in child frames since
|
/* Frame synchronization can't be used in child frames since
|
||||||
they are not directly managed by the compositing manager.
|
they are not directly managed by the compositing manager.
|
||||||
Re-enabling vsync in former child frames also leads to
|
Re-enabling vsync in former child frames also leads to
|
||||||
|
@ -2421,7 +2421,7 @@ static void
|
||||||
x_set_use_frame_synchronization (struct frame *f, Lisp_Object arg,
|
x_set_use_frame_synchronization (struct frame *f, Lisp_Object arg,
|
||||||
Lisp_Object oldval)
|
Lisp_Object oldval)
|
||||||
{
|
{
|
||||||
#if !defined USE_GTK && defined HAVE_XSYNC
|
#if defined HAVE_XSYNC && !defined USE_GTK && defined HAVE_CLOCK_GETTIME
|
||||||
struct x_display_info *dpyinfo;
|
struct x_display_info *dpyinfo;
|
||||||
|
|
||||||
dpyinfo = FRAME_DISPLAY_INFO (f);
|
dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||||
|
|
14
src/xterm.c
14
src/xterm.c
|
@ -6655,7 +6655,7 @@ x_set_frame_alpha (struct frame *f)
|
||||||
Starting and ending an update
|
Starting and ending an update
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
#if defined HAVE_XSYNC && !defined USE_GTK
|
#if defined HAVE_XSYNC && !defined USE_GTK && defined HAVE_CLOCK_GETTIME
|
||||||
|
|
||||||
/* Wait for an event matching PREDICATE to show up in the event
|
/* Wait for an event matching PREDICATE to show up in the event
|
||||||
queue, or TIMEOUT to elapse.
|
queue, or TIMEOUT to elapse.
|
||||||
|
@ -7029,7 +7029,7 @@ x_sync_handle_frame_drawn (struct x_display_info *dpyinfo,
|
||||||
static void
|
static void
|
||||||
x_update_begin (struct frame *f)
|
x_update_begin (struct frame *f)
|
||||||
{
|
{
|
||||||
#if defined HAVE_XSYNC && !defined USE_GTK
|
#if defined HAVE_XSYNC && !defined USE_GTK && defined HAVE_CLOCK_GETTIME
|
||||||
/* If F is double-buffered, we can make the entire frame center
|
/* If F is double-buffered, we can make the entire frame center
|
||||||
around XdbeSwapBuffers. */
|
around XdbeSwapBuffers. */
|
||||||
#ifdef HAVE_XDBE
|
#ifdef HAVE_XDBE
|
||||||
|
@ -7138,7 +7138,7 @@ show_back_buffer (struct frame *f)
|
||||||
|
|
||||||
if (FRAME_X_DOUBLE_BUFFERED_P (f))
|
if (FRAME_X_DOUBLE_BUFFERED_P (f))
|
||||||
{
|
{
|
||||||
#if defined HAVE_XSYNC && !defined USE_GTK
|
#if defined HAVE_XSYNC && !defined USE_GTK && defined HAVE_CLOCK_GETTIME
|
||||||
/* Wait for drawing of the previous frame to complete before
|
/* Wait for drawing of the previous frame to complete before
|
||||||
displaying this new frame. */
|
displaying this new frame. */
|
||||||
x_sync_wait_for_frame_drawn_event (f);
|
x_sync_wait_for_frame_drawn_event (f);
|
||||||
|
@ -7157,7 +7157,7 @@ show_back_buffer (struct frame *f)
|
||||||
swap_info.swap_action = XdbeCopied;
|
swap_info.swap_action = XdbeCopied;
|
||||||
XdbeSwapBuffers (FRAME_X_DISPLAY (f), &swap_info, 1);
|
XdbeSwapBuffers (FRAME_X_DISPLAY (f), &swap_info, 1);
|
||||||
|
|
||||||
#if defined HAVE_XSYNC && !defined USE_GTK
|
#if defined HAVE_XSYNC && !defined USE_GTK && defined HAVE_CLOCK_GETTIME
|
||||||
/* Finish the frame here. */
|
/* Finish the frame here. */
|
||||||
x_sync_update_finish (f);
|
x_sync_update_finish (f);
|
||||||
#endif
|
#endif
|
||||||
|
@ -7211,7 +7211,7 @@ x_update_end (struct frame *f)
|
||||||
/* If double buffering is disabled, finish the update here.
|
/* If double buffering is disabled, finish the update here.
|
||||||
Otherwise, finish the update when the back buffer is next
|
Otherwise, finish the update when the back buffer is next
|
||||||
displayed. */
|
displayed. */
|
||||||
#if defined HAVE_XSYNC && !defined USE_GTK
|
#if defined HAVE_XSYNC && !defined USE_GTK && defined HAVE_CLOCK_GETTIME
|
||||||
#ifdef HAVE_XDBE
|
#ifdef HAVE_XDBE
|
||||||
if (!FRAME_X_DOUBLE_BUFFERED_P (f))
|
if (!FRAME_X_DOUBLE_BUFFERED_P (f))
|
||||||
#endif
|
#endif
|
||||||
|
@ -7615,7 +7615,7 @@ x_display_set_last_user_time (struct x_display_info *dpyinfo, Time time,
|
||||||
if (!send_event || time > dpyinfo->last_user_time)
|
if (!send_event || time > dpyinfo->last_user_time)
|
||||||
dpyinfo->last_user_time = time;
|
dpyinfo->last_user_time = time;
|
||||||
|
|
||||||
#if defined HAVE_XSYNC && !defined USE_GTK
|
#if defined HAVE_XSYNC && !defined USE_GTK && defined HAVE_CLOCK_GETTIME
|
||||||
if (!send_event)
|
if (!send_event)
|
||||||
{
|
{
|
||||||
/* See if the current CLOCK_MONOTONIC time is reasonably close
|
/* See if the current CLOCK_MONOTONIC time is reasonably close
|
||||||
|
@ -17995,7 +17995,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined HAVE_XSYNC && !defined USE_GTK
|
#if defined HAVE_XSYNC && !defined USE_GTK && defined HAVE_CLOCK_GETTIME
|
||||||
/* These messages are sent by the compositing manager after a
|
/* These messages are sent by the compositing manager after a
|
||||||
frame is drawn under extended synchronization. */
|
frame is drawn under extended synchronization. */
|
||||||
if (event->xclient.message_type
|
if (event->xclient.message_type
|
||||||
|
|
|
@ -1119,7 +1119,7 @@ struct x_output
|
||||||
frame. */
|
frame. */
|
||||||
bool_bf waiting_for_frame_p : 1;
|
bool_bf waiting_for_frame_p : 1;
|
||||||
|
|
||||||
#ifndef USE_GTK
|
#if !defined USE_GTK && defined HAVE_CLOCK_GETTIME
|
||||||
/* Whether or not Emacs should wait for the compositing manager to
|
/* Whether or not Emacs should wait for the compositing manager to
|
||||||
draw frames before starting a new frame. */
|
draw frames before starting a new frame. */
|
||||||
bool_bf use_vsync_p : 1;
|
bool_bf use_vsync_p : 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue