WPT details: API tests (setting and getting): https://wpt.fyi/results/html/canvas/element/manual/context-attributes/getContextAttributes.html Draw-and-readback tests: https://wpt.fyi/results/?label=experimental&label=master&aligned&q=2d.color.space Chromium CLs: https://chromium-review.git.corp.google.com/c/chromium/src/+/8313909 Roundtrip tests (toDataURL, toBlob, etc): https://chromium-review.git.corp.google.com/c/chromium/src/+/8312949 https://chromium-review.git.corp.google.com/c/chromium/src/+/8314209
Add srgb-linear and display-p3-linear color spaces (as defined by CSS) to PredefinedColorSpace for use with canvases.
Linear color spaces (where pixel values correspond linearly to luminance) are extremely commonly used in applications with connections to physical light rendering (e.g, games) or spatial processing (e.g, decimation, anti-aliasing, and interpolation).