-
Notifications
You must be signed in to change notification settings - Fork 547
Description
Description
Add support for Display P3 color space in offscreen surfaces to match the onscreen rendering capabilities introduced in v2.0.1.
Problem
Currently, onscreen Canvas supports Display P3 color space on iOS (since v2.0.1, PR #3153), but offscreen surfaces created with MakeOffscreen() are limited to sRGB. This creates a significant color mismatch between what users see in the app and what gets saved/exported.
For photo/video editing apps, this discrepancy is critical - users edit with vibrant P3 colors on screen but receive duller sRGB colors in saved files.
Proposed Solution
Add optional configuration parameter to MakeOffscreen() to specify color space:
const surface = Skia.Surface.MakeOffscreen(width, height, {
colorType: ColorType.RGBA_F16, // or RGBA_8888
colorSpace: 'display-p3' // or 'srgb' for backwards compatibility
});Related
Discussion: #3149
PR attempt: #3165 (not merged)
Onscreen P3: #3153 (working since v2.0.1)
Environment
React Native Skia: ^2.0.1
Platform: iOS (P3 displays)