diff options
| author | Robert Pluim | 2020-01-24 14:11:44 +0100 |
|---|---|---|
| committer | Robert Pluim | 2020-03-02 09:59:34 +0100 |
| commit | fe1a447d52f548441d19af580ed11ef56d4459d2 (patch) | |
| tree | baa0419db5d8a8b7605c80b55cefe6fbefc0d7f6 /src/font.h | |
| parent | b42b894d1def7180ab715615116fe6af65b76bd8 (diff) | |
| download | emacs-fe1a447d52f548441d19af580ed11ef56d4459d2.tar.gz emacs-fe1a447d52f548441d19af580ed11ef56d4459d2.zip | |
Don't attempt to cache glyph metrics for FONT_INVALID_CODE
This was causing massive slowdown in redisplay when eg #xfe0f
(VARIATION SELECTOR-16) was present, as the cache ended up very large,
unused, and being recreated on every call to font_fill_lglyph_metrics
(Bug#39133).
* src/composite.c (fill_gstring_body): Hoist FONT_OBJECT_P check out
of loop. Calculate glyph code and check for FONT_INVALID_CODE before
calling font_fill_lglyph_metrics. Pass glyph code to it.
* src/font.c (font_fill_lglyph_metrics): Add code parameter, move
glyph code calculation up the call stack into fill_gstring_body.
* src/font.h: Adjust font_fill_lglyph_metrics prototype.
Diffstat (limited to 'src/font.h')
| -rw-r--r-- | src/font.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/font.h b/src/font.h index 633d92709c5..6f4792afe55 100644 --- a/src/font.h +++ b/src/font.h | |||
| @@ -886,7 +886,7 @@ extern Lisp_Object font_update_drivers (struct frame *f, Lisp_Object list); | |||
| 886 | extern Lisp_Object font_range (ptrdiff_t, ptrdiff_t, ptrdiff_t *, | 886 | extern Lisp_Object font_range (ptrdiff_t, ptrdiff_t, ptrdiff_t *, |
| 887 | struct window *, struct face *, | 887 | struct window *, struct face *, |
| 888 | Lisp_Object); | 888 | Lisp_Object); |
| 889 | extern void font_fill_lglyph_metrics (Lisp_Object, Lisp_Object); | 889 | extern void font_fill_lglyph_metrics (Lisp_Object, struct font *, unsigned int); |
| 890 | 890 | ||
| 891 | extern Lisp_Object font_put_extra (Lisp_Object font, Lisp_Object prop, | 891 | extern Lisp_Object font_put_extra (Lisp_Object font, Lisp_Object prop, |
| 892 | Lisp_Object val); | 892 | Lisp_Object val); |