mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-29 12:17:14 -06:00
The window's CAMetalLayer had no color space: wgpu 30.0.1 sets it to nil for an sRGB surface each time it configures the surface, and Core Animation does not color-match a layer without one. On a wide-gamut display #FF0000 showed as the display's own red, (255, 0, 0) in a capture where Preview shows the same sRGB red as (234, 51, 35). A paint callback that draws nothing runs after egui configures the surface and before the frame is presented. It sets sRGB on each window's Metal layer that has no color space and leaves any other color space as it is. wgpu's own fix (gfx-rs/wgpu#10286) is in no release yet. Fixes #3161.