diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-12-31 13:12:38 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-12-31 13:12:38 +0200 |
commit | 897e8eb967bb2e26410d1a0cb7ca41ce9e3cf953 (patch) | |
tree | 01a0749073cc645471482d634226b09e97ee3caa /src/ui/window.c | |
parent | b17a50de97780ab43ca958f9d84200388cac9b90 (diff) |
Text: Clear glyph cache when it fills up
We can use a smaller glyph cache if we clear it when it fills up. Even a large cache would eventually fill up, so clearing is a good strategy anyway. Clears occur still rather infrequently.
Diffstat (limited to 'src/ui/window.c')
-rw-r--r-- | src/ui/window.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui/window.c b/src/ui/window.c index 2933a47d..c13d5843 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -969,7 +969,7 @@ void draw_Window(iWindow *d) { | |||
969 | #if 0 | 969 | #if 0 |
970 | /* Text cache debugging. */ { | 970 | /* Text cache debugging. */ { |
971 | SDL_Texture *cache = glyphCache_Text(); | 971 | SDL_Texture *cache = glyphCache_Text(); |
972 | SDL_Rect rect = { d->root->rect.size.x - 640, 0, 640, 5 * 640 }; | 972 | SDL_Rect rect = { d->root->rect.size.x - 640, 0, 640, 2.5 * 640 }; |
973 | SDL_SetRenderDrawColor(d->render, 0, 0, 0, 255); | 973 | SDL_SetRenderDrawColor(d->render, 0, 0, 0, 255); |
974 | SDL_RenderFillRect(d->render, &rect); | 974 | SDL_RenderFillRect(d->render, &rect); |
975 | SDL_RenderCopy(d->render, glyphCache_Text(), NULL, &rect); | 975 | SDL_RenderCopy(d->render, glyphCache_Text(), NULL, &rect); |