0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 8.0.1449: slow redrawing with DirectX

Problem:    Slow redrawing with DirectX.
Solution:   Avoid calling gui_mch_flush() unnecessarily, especially when
            updating the cursor. (Ken Takata, closes #2560)
This commit is contained in:
Bram Moolenaar
2018-01-31 20:51:47 +01:00
parent 37badc898b
commit a338adcf22
19 changed files with 224 additions and 173 deletions

View File

@@ -468,16 +468,14 @@ redraw_after_callback(int call_update_screen)
setcursor();
}
cursor_on();
out_flush();
#ifdef FEAT_GUI
if (gui.in_use)
{
if (gui.in_use && !gui_mch_is_blink_off())
/* Don't update the cursor when it is blinking and off to avoid
* flicker. */
if (!gui_mch_is_blink_off())
gui_update_cursor(FALSE, FALSE);
gui_mch_flush();
}
out_flush_cursor(FALSE, FALSE);
else
#else
out_flush();
#endif
--redrawing_for_callback;
@@ -800,9 +798,12 @@ update_screen(int type_arg)
* done. */
if (gui.in_use)
{
out_flush(); /* required before updating the cursor */
if (did_undraw && !gui_mch_is_blink_off())
{
mch_disable_flush();
out_flush(); /* required before updating the cursor */
mch_enable_flush();
/* Put the GUI position where the cursor was, gui_update_cursor()
* uses that. */
gui.col = gui_cursor_col;
@@ -811,9 +812,12 @@ update_screen(int type_arg)
gui.col = mb_fix_col(gui.col, gui.row);
# endif
gui_update_cursor(FALSE, FALSE);
gui_may_flush();
screen_cur_col = gui.col;
screen_cur_row = gui.row;
}
else
out_flush();
gui_update_scrollbars(FALSE);
}
#endif
@@ -863,8 +867,7 @@ update_finish(void)
* done. */
if (gui.in_use)
{
out_flush(); /* required before updating the cursor */
gui_update_cursor(FALSE, FALSE);
out_flush_cursor(FALSE, FALSE);
gui_update_scrollbars(FALSE);
}
# endif