Skip to content

v0.3.5

Choose a tag to compare

@dyike dyike released this 18 Oct 07:15
· 55 commits to main since this release

Cut surface and mutable-image uploads, and add custom Info.plist keys.

  • paint.NewSurfaceOp draws the current picture of a paint.Surface without copying it; Metal wraps each new IOSurface in a texture through newTextureWithDescriptor:iosurface:plane:. A 4K video frame no longer takes a swizzle, a copy into tiles and an upload. Devices without the extension draw a transparent pixel.
  • paint.NewMutableImageOp keeps one texture per image and uploads only the areas changed since the texture's version, or the whole image when the texture fell further behind. Tinted textures re-tint the changed area only. paint.FilterLinearNoMipmap samples without a mip chain for images drawn near their native size and skips the Metal CPU mipmap path. A 2880x1800 remote desktop screen repainted 30 times a second went from ~450 MB to ~324 MB footprint, live Go heap from 104 MB to 43 MB and GCs from 67 to 11 a minute.
  • macos.info_plist and ios.info_plist in keel.json add keys to the generated Info.plist, such as NSLocalNetworkUsageDescription. Values may be JSON strings, booleans, numbers, arrays and objects; keys Keel derives from other fields are reserved and rejected by name.
  • Password inputs center the mask vertically in single-line boxes taller than the line, across faces, text sizes and pixel scales.

Only Metal ran the surface and mutable-image paths in a real window. Both patches are listed in upstream-patches.md.

Validation: gofmt, vet and module tests from a clean checkout, CGO_ENABLED=0 GOOS=windows go build ./..., cgo-free native/cmd build, and the offline component check. One local run reported TestEveryModuleIsListed; it read untracked draft modules in the gitignored work/ directory and passes in a clean checkout.

本版让画面走 IOSurface 纹理、可变图像只上传变化区域,并支持在 keel.json 里补充 Info.plist 键,同时修正密码框遮罩垂直居中。Surface 和可变图像两条路径只在 Metal 真窗口中验证过。

Compare: v0.3.4...v0.3.5