the backend
blend2d, dwrite and the three present paths, plus every sharp edge already found
the half you need when something renders wrong
the three present paths
| presenter | how | keeps contents | for |
|---|---|---|---|
| layered | 32bpp dib + UpdateLayeredWindow | yes | shaped overlays, per-pixel alpha, the free os hit test |
| opaque | the same dib + BitBlt | yes | the chromed resizable app window |
| dcomp | composition swapchain + Present1 | no | vsync pacing, gpu resize |
a dcomp
WRITE_DISCARDmap hands back undefined memory, so last frames pixels are gone and the repaint must be full every frame. getkeeps_contents()backwards and it shows up as garbage outside the dirty box on dcomp only, while the other two look perfect
the sharp edges
none of these are theoretical, every one cost somebody a session
| edge | what it looks like |
|---|---|
| the first frame costs 26ms | a visible stutter on the very first paint, never again. a throwaway prewarm frame hides it |
| the fill rule is on the CONTEXT | an even odd icon fills as a solid block if you set it on the path |
threads stays 0 | 4 threads buys 16% on a full repaint and costs 77% on a dirty rect |
| destroy order | context, then image, then dib. the image is a view onto the dibs bytes |
| the dib must be top-down | everything renders flipped otherwise |
two accepted limits
- no blur. there is no effects pipeline, shadows are stacked translucent rings, so
spreadis a ring count and going big looks like rings - grayscale text aa only, no lcd subpixel, so text sits a touch lighter than cleartype
fonts
dwrite resolves family plus weight plus style out to a file path and a face index, and blend2d gets handed the answer. that kills a whole bug class the ahk resolver had
| it gets right | the bug it kills |
|---|---|
| the face index is carried | Cambria Math silently opening plain Cambria out of CAMBRIA.TTC |
| a per user font is found | a no-admin install is absent from the dwrite system set entirely |
| a missing family degrades | the ask, then Segoe UI, then Tahoma |
variable font axes are permanent, not a stopgap. blend2d never implemented them and the author has said it may never happen, so a synthetic stroke stands in for weight