From 371074e1c263d89fbc1504cfa6415f1ef5ebed96 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 21 May 2001 15:24:34 +0000 Subject: [PATCH] (struct x_display_info) [HAVE_DBE]: Add member `dbe'. (struct x_output): Add back_buffer. (struct x_output) (HAVE_DBE]: Add dbe_min_x, dbe_min_y, dbe_max_x, dbe_max_y. (FRAME_X_DRAWABLE): New macro. (init_dbe, dbe_make_frame_buffered, dbe_reset_region) (dbe_record_region, dbe_show) [HAVE_DBE]: Add prototypes. (x_clear_area): Change prototype. --- src/ChangeLog | 33 +++++++++++++++++++++++++++++++++ src/xterm.h | 27 ++++++++++++++++++++++++++- 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2b9f48db551..d117cb586dc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,36 @@ +2001-05-21 Gerd Moellmann + + * config.in (HAVE_DBE): Add. + + * xterm.c: Use FRAME_X_DRAWABLE instead of FRAME_X_WINDOW + when drawing. + (x_update_begin) [HAVE_DBE]: Call dbe_reset_region. + (x_update_end) [HAVE_DBE]: Call dbe_show. + (x_draw_glyph_string) [HAVE_DBE]: Call dbe_record_region. + (x_clear_area): Take a pointer to a frame as parameter instead + of a Display and a Window. Clear a back-buffer, if any. + (x_scroll_run) [HAVE_DBE]: Call dbe_record_region. + (expose_frame) [HAVE_DBE]: Call dbe_show. + (note_mouse_highlight) [HAVE_DBE]: Call dbe_show. + (x_draw_bar_cursor) [HAVE_DBE]: Call dbe_record_region. + (x_term_init) [HAVE_DBE]: Call init_dbe. + + * dispnew.c (direct_output_forward_char): Call + update_begin/update_end. + + * xfns.c (Fx_create_frame) [HAVE_DBE]: Make frame double-buffered. + (init_dbe, dbe_make_frame_buffered, dbe_reset_region) + (dbe_record_region, dbe_show) [HAVE_DBE]: New functions. + + * xterm.h (struct x_display_info) [HAVE_DBE]: Add member `dbe'. + (struct x_output): Add back_buffer. + (struct x_output) (HAVE_DBE]: Add dbe_min_x, dbe_min_y, dbe_max_x, + dbe_max_y. + (FRAME_X_DRAWABLE): New macro. + (init_dbe, dbe_make_frame_buffered, dbe_reset_region) + (dbe_record_region, dbe_show) [HAVE_DBE]: Add prototypes. + (x_clear_area): Change prototype. + 2001-05-18 Gerd Moellmann * eval.c (call_debugger): Don't bind inhibit-eval-during-redisplay. diff --git a/src/xterm.h b/src/xterm.h index aecd5fead07..51255ed471a 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -346,6 +346,11 @@ struct x_display_info use this directly, call x_color_cells instead. */ XColor *color_cells; int ncolor_cells; + +#ifdef HAVE_DBE + /* Non-zero means DOUBLE-BUFFER extension can be used. */ + int dbe; +#endif /* HAVE_DBE */ }; /* This checks to make sure we have a display. */ @@ -581,11 +586,23 @@ struct x_output /* The background for which the above relief GCs were set up. They are changed only when a different background is involved. */ unsigned long relief_background; + + Drawable back_buffer; + +#ifdef HAVE_DBE + /* Region that must be copied from the back-buffer to the display. */ + int dbe_min_x, dbe_max_x, dbe_min_y, dbe_max_y; +#endif /* HAVE_DBE */ }; /* Return the X window used for displaying data in frame F. */ #define FRAME_X_WINDOW(f) ((f)->output_data.x->window_desc) +#define FRAME_X_DRAWABLE(f) \ + ((f)->output_data.x->back_buffer \ + ? (f)->output_data.x->back_buffer \ + : FRAME_X_WINDOW (f)) + /* Return the outermost X window associated with the frame F. */ #ifdef USE_X_TOOLKIT #define FRAME_OUTER_WINDOW(f) (XtWindow ((f)->output_data.x->widget)) @@ -919,6 +936,14 @@ void x_handle_property_notify P_ ((XPropertyEvent *)); /* From xfns.c. */ +#ifdef HAVE_DBE +extern int init_dbe P_ ((Display *)); +extern void dbe_make_frame_buffered P_ ((struct frame *)); +extern void dbe_reset_region P_ ((struct frame *)); +extern void dbe_record_region P_ ((struct frame *, int, int, int, int)); +extern void dbe_show P_ ((struct frame *)); +#endif /* HAVE_DBE */ + Lisp_Object display_x_get_resource P_ ((struct x_display_info *, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)); @@ -994,7 +1019,7 @@ extern XtAppContext Xt_app_con; #endif extern void x_query_colors P_ ((struct frame *f, XColor *, int)); extern void x_query_color P_ ((struct frame *f, XColor *)); -extern void x_clear_area P_ ((Display *, Window, int, int, int, int, int)); +extern void x_clear_area P_ ((struct frame *, int, int, int, int)); /* Defined in xselect.c */ -- 2.39.5