popup: one text drawing call; drop what the draw thread never reaches

font.c exported three wrappers for one function, and the fit == -1 mode
existed only for the tests; textdraw() takes fit and colour. win.c
tested the empty picture in the thread and again in winshow, interned
two atoms by hand next to getatom(), kept a consumer-side drain that the
producer's already guarantees never finds anything, zeroed ten globals
before returning from the only thread that read them, and re-checked
sizes that resizebacking had just established. The page marker is laid
out once and drawn from the layout instead of being recomputed.
This commit is contained in:
2026-08-16 16:22:37 +09:00
parent eaf31da0d1
commit 849bf1278b
7 changed files with 91 additions and 169 deletions

4
fn.h
View File

@@ -47,6 +47,4 @@ void* erealloc(void*, ulong);
int textinit(void);
void textclose(void);
int textwidth(Str*);
void textdraw(u32int*, int, int, int, int, Str*);
void textdrawfit(u32int*, int, int, int, int, int, Str*);
void textdrawfitcolor(u32int*, int, int, int, int, int, u32int, Str*);
void textdraw(u32int*, int, int, int, int, int, u32int, Str*);