diff options
| author | Richard M. Stallman | 1994-10-14 05:20:15 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-10-14 05:20:15 +0000 |
| commit | 463f6b91cfb53a20f8f260a2f847886544c099a5 (patch) | |
| tree | a7317c529aa4c5d054b41d7d837f6a472108ddc8 /src | |
| parent | 42120bc769f1cd7335ed5070a9c70b40da7335b3 (diff) | |
| download | emacs-463f6b91cfb53a20f8f260a2f847886544c099a5.tar.gz emacs-463f6b91cfb53a20f8f260a2f847886544c099a5.zip | |
(redisplay): Call clear_face_cache instead
of clear_face_vector. Do it at most once per 1000 redisplays.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 5d4c579b905..cbcad61400e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -545,6 +545,10 @@ prepare_menu_bars () | |||
| 545 | 545 | ||
| 546 | static int do_verify_charstarts; | 546 | static int do_verify_charstarts; |
| 547 | 547 | ||
| 548 | /* Counter is used to clear the face cache | ||
| 549 | no more than once ever 1000 redisplays. */ | ||
| 550 | static int clear_face_cache_count; | ||
| 551 | |||
| 548 | void | 552 | void |
| 549 | redisplay () | 553 | redisplay () |
| 550 | { | 554 | { |
| @@ -732,14 +736,20 @@ redisplay () | |||
| 732 | this_line_bufpos = 0; | 736 | this_line_bufpos = 0; |
| 733 | all_windows |= buffer_shared > 1; | 737 | all_windows |= buffer_shared > 1; |
| 734 | 738 | ||
| 739 | clear_face_cache_count++; | ||
| 740 | |||
| 735 | if (all_windows) | 741 | if (all_windows) |
| 736 | { | 742 | { |
| 737 | Lisp_Object tail, frame; | 743 | Lisp_Object tail, frame; |
| 738 | 744 | ||
| 739 | #ifdef HAVE_X_WINDOWS | 745 | #ifdef HAVE_X_WINDOWS |
| 740 | /* Since we're doing a thorough redisplay, we might as well | 746 | /* Clear the face cache, only when we do a full redisplay |
| 741 | recompute all our display faces. */ | 747 | and not too often either. */ |
| 742 | clear_face_vector (); | 748 | if (clear_face_cache_count > 1000) |
| 749 | { | ||
| 750 | clear_face_cache (); | ||
| 751 | clear_face_cache_count = 0; | ||
| 752 | } | ||
| 743 | #endif | 753 | #endif |
| 744 | 754 | ||
| 745 | /* Recompute # windows showing selected buffer. | 755 | /* Recompute # windows showing selected buffer. |