Files
magpie/internal/gui
yetone 8f4ef16ea3 gui: a tray logo is masked once, when the cells come, not on every draw
mpCells kept each provider logo as the NSImage decoded from its file,
and mpDraw masked it again (a 128x128 bitmap drawn, scanned twice and
cut) every time the menu bar image was drawn: each show, each
appearance change, each frame of the bird's flap. Drawing the source
also left its full-size decode cached in the NSImage for as long as the
cells were up, which vmmap showed as 4.6 MB of CG image on a tray with
a few large PNG logos.

mpGlyph now does the mask once per logo in mpCells and keeps only the
cropped mask (copied out of the 128x128 bitmap, so that goes too) and
whether it is a solid tile. The decoded logo is released at once.
mpMasked only fits and tints the kept mask.

Run (mote):
- go vet ./internal/gui; go test -run 'Tray|Image|Cell' ./internal/gui ok
  (TestTrayImageMonoLogos, TestTrayImageLogoSizes among them).
- Pixel identity: every logo in assets/icons (213), light and dark, at
  scale 1 and 2, rendered through trayImagePNG with the old and the new
  code: 852 of 852 PNGs byte-identical (a throwaway test, not committed).
2026-11-14 13:03:16 +08:00
..
…
…