Skip to content

Implement native Display P3 color space support#62

Closed
ThomasWaldmann wants to merge 1 commit into
swellweb:mainfrom
ThomasWaldmann:display-p3
Closed

Implement native Display P3 color space support#62
ThomasWaldmann wants to merge 1 commit into
swellweb:mainfrom
ThomasWaldmann:display-p3

Conversation

@ThomasWaldmann
Copy link
Copy Markdown
Contributor

This adds native Display P3 wide-gamut support across TargetBridge.

Sender (Swift)

  • Configures SCStreamConfiguration to capture desktop frames in P3.
  • Passes P3 CGColorSpace to CGDisplayStream properties for Direct Display Mode.
  • Tags VTCompressionSession with Display P3 primaries, Rec. 709 transfer characteristics, and Rec. 709 YCbCr matrix VUI parameters.

Receiver (C)

  • Uses pure-C Objective-C runtime functions on macOS to assign the native [NSColorSpace displayP3ColorSpace] to the receiver's Cocoa NSWindow.

No CPU/GPU or network bandwidth overhead is introduced since it remains an 8-bit SDR profile.

This adds native Display P3 wide-gamut support across TargetBridge:
1. Configures SCStreamConfiguration to capture desktop frames in P3.
2. Passes P3 CGColorSpace to CGDisplayStream properties for Direct Display Mode.
3. Tags VTCompressionSession with Display P3 primaries, Rec. 709 transfer characteristics, and Rec. 709 YCbCr matrix VUI parameters.
4. Uses pure-C Objective-C runtime functions on macOS to assign the native [NSColorSpace displayP3ColorSpace] to the receiver's Cocoa NSWindow.
@ThomasWaldmann
Copy link
Copy Markdown
Contributor Author

ThomasWaldmann commented May 24, 2026

Test page: https://webkit.org/blog-files/color-gamut/

Not working yet: On the receiver iMac 2020 I can't see the webkit logo on Display P3.

@ThomasWaldmann ThomasWaldmann deleted the display-p3 branch May 24, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant