window
the backend

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

presenterhowkeeps contentsfor
layered32bpp dib + UpdateLayeredWindowyesshaped overlays, per-pixel alpha, the free os hit test
opaquethe same dib + BitBltyesthe chromed resizable app window
dcompcomposition swapchain + Present1novsync pacing, gpu resize

a dcomp WRITE_DISCARD map hands back undefined memory, so last frames pixels are gone and the repaint must be full every frame. get keeps_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

edgewhat it looks like
the first frame costs 26msa visible stutter on the very first paint, never again. a throwaway prewarm frame hides it
the fill rule is on the CONTEXTan even odd icon fills as a solid block if you set it on the path
threads stays 04 threads buys 16% on a full repaint and costs 77% on a dirty rect
destroy ordercontext, then image, then dib. the image is a view onto the dibs bytes
the dib must be top-downeverything renders flipped otherwise

two accepted limits

  • no blur. there is no effects pipeline, shadows are stacked translucent rings, so spread is 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 rightthe bug it kills
the face index is carriedCambria Math silently opening plain Cambria out of CAMBRIA.TTC
a per user font is founda no-admin install is absent from the dwrite system set entirely
a missing family degradesthe 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

On this page