Skip to content

fix(macos): normalize composited test screenshots - #1005

Merged
houko merged 1 commit into
mainfrom
assess/issue311-macos-capture
Nov 20, 2026
Merged

houko merged 1 commit into
mainfrom
assess/issue311-macos-capture

Conversation

@houko

@houko houko commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Closes #311

macOS test captures now convert both WindowServer composites and AppKit fallback bitmaps to sRGB before PNG encoding. This keeps pixel comparisons reproducible on Display P3 machines while preserving the composited path for Core Animation shadows, masks, filters, animations, backdrops, and caret rendering. The capture regression fixture comment and English and Chinese testing docs now describe the conversion.

Checks:

  • go tool nsgo check -target macos -jobs 1
  • go tool nsgo test -target macos -run '^TestMountIgnoresCommandsForMissingViews$' ./internal/platform/macos
  • go tool nsgo test -target macos ./internal/testhost/testdata/capture (the composited capture case cannot pass in this environment because WindowServer returned no image and the documented AppKit fallback was used)

@github-actions github-actions Bot added size/S documentation Improvements or additions to documentation macOS bug Something isn't working labels Nov 20, 2026
@github-actions github-actions Bot added the conflict Conflicts with the base branch; resolve it first label Nov 20, 2026
@houko
houko force-pushed the assess/issue311-macos-capture branch from 2c98198 to efccac8 Compare November 20, 2026 14:37
@github-actions github-actions Bot removed the conflict Conflicts with the base branch; resolve it first label Nov 20, 2026
@houko
houko force-pushed the assess/issue311-macos-capture branch from efccac8 to 30b5e87 Compare November 20, 2026 15:15
@github-actions github-actions Bot added the conflict Conflicts with the base branch; resolve it first label Nov 20, 2026
@houko

houko commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator Author

Reviewed.

@houko
houko force-pushed the assess/issue311-macos-capture branch from 30b5e87 to 3b9d9f0 Compare November 20, 2026 16:06
@houko
houko merged commit f480bcc into main Nov 20, 2026
@houko
houko deleted the assess/issue311-macos-capture branch November 20, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working conflict Conflicts with the base branch; resolve it first documentation Improvements or additions to documentation macOS size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS: nsgo test screenshots (cacheDisplayInRect:) leave out shadows, per-corner radii, antialiasing, animations, backdrops and the caret

1 participant