commit 8739e6993aa8ff767e14a2c2c01808cc155f8bcc
parent 94ffc166fd06e976b109ad0fc04887da3c95f587
Author: ukai <ukai>
Date: Thu, 6 Feb 2003 17:15:04 +0000
[w3m-dev 03732] Re: scroll() is slow ?
* configure (use_raw_scroll): added
(config.h) use_raw_scroll
* config.h.dist (USE_RAW_SCROLL): added
* display.c (displayBuffer): ifdef USE_RAW_SCROLL
* proto.h (scroll): ifdef USE_RAW_SCROLL
(rscroll): ditto
(need_clrtoeol): if 0
(terms.c): if 0 need_clrtoeol
(scroll_raw): ifdef USE_RAW_SCROLL
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat:
6 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,16 @@
+2003-02-07 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 03732] Re: scroll() is slow ?
+ * configure (use_raw_scroll): added
+ (config.h) use_raw_scroll
+ * config.h.dist (USE_RAW_SCROLL): added
+ * display.c (displayBuffer): ifdef USE_RAW_SCROLL
+ * proto.h (scroll): ifdef USE_RAW_SCROLL
+ (rscroll): ditto
+ (need_clrtoeol): if 0
+ (terms.c): if 0 need_clrtoeol
+ (scroll_raw): ifdef USE_RAW_SCROLL
+
2003-02-06 Fumitoshi UKAI <ukai@debian.or.jp>
* NEWS: rc: decode_url
diff --git a/config.h.dist b/config.h.dist
@@ -55,6 +55,11 @@
#undef MENU_THIN_FRAME
/*
+ * Use raw scroll
+ */
+#undef USE_RAW_SCROLL
+
+/*
*/
#undef TABLE_EXPAND
#undef TABLE_NO_COMPACT
diff --git a/configure b/configure
@@ -883,6 +883,7 @@ def_param use_bufinfo n
def_param use_egd y
def_param enable_remove_trailingspaces n
def_param menu_thin_frame n
+def_param use_raw_scroll n
def_param emacs_like_lineedit $include_opt
def_param vi_prec_num $include_opt
def_param label_topline $include_opt
@@ -2316,6 +2317,11 @@ $def_enable_remove_trailingspaces
$def_menu_thin_frame
/*
+ * Use raw scroll
+ */
+$def_use_raw_scroll
+
+/*
*/
$def_table_expand
$def_table_no_compact
diff --git a/display.c b/display.c
@@ -417,6 +417,7 @@ displayBuffer(Buffer *buf, int mode)
}
if (mode == B_FORCE_REDRAW || mode == B_SCROLL || mode == B_REDRAW_IMAGE ||
cline != buf->topLine || ccolumn != buf->currentColumn) {
+#ifdef USE_RAW_SCROLL
if (
#ifdef USE_IMAGE
!(activeImage && displayImage && draw_image_flag) &&
@@ -439,7 +440,9 @@ displayBuffer(Buffer *buf, int mode)
}
redrawNLine(buf, n);
}
- else {
+ else
+#endif
+ {
#ifdef USE_IMAGE
if (activeImage &&
(mode == B_REDRAW_IMAGE ||
diff --git a/proto.h b/proto.h
@@ -449,9 +449,13 @@ extern void setbcolor(int color);
#endif /* USE_COLOR */
extern void refresh(void);
extern void clear(void);
+#ifdef USE_RAW_SCROLL
extern void scroll(int);
extern void rscroll(int);
+#endif
+#if 0
extern void need_clrtoeol(void);
+#endif
extern void clrtoeol(void);
extern void clrtoeolx(void);
extern void clrtobot(void);
diff --git a/terms.c b/terms.c
@@ -398,7 +398,10 @@ void clear(), wrap(), touch_line(), touch_column(int);
void switch_wchar(FILE *);
void switch_ascii(FILE *);
#endif
-void need_clrtoeol(void), clrtoeol(void); /* conflicts with curs_clear(3)? */
+#if 0
+void need_clrtoeol(void);
+#endif
+void clrtoeol(void); /* conflicts with curs_clear(3)? */
int write1(char);
@@ -1444,6 +1447,7 @@ clear(void)
CurrentMode = C_ASCII;
}
+#ifdef USE_RAW_SCROLL
static void
scroll_raw(void)
{ /* raw scroll */
@@ -1535,6 +1539,7 @@ rscroll(int n)
}
}
}
+#endif
#if 0
void