Summary: | Add support for display-p3 canvas and ImageData | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Christopher Cameron <ccameron> | ||||||||
Component: | Canvas | Assignee: | Sam Weinig <sam> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | dino, fserb, heycam, jonlee, sam, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | 225173, 225177, 225237, 225263, 225271, 225280, 225286, 225813, 225836, 225841, 229021, 229022, 229023, 229024, 229025, 230209, 231062, 231145 | ||||||||||
Bug Blocks: | 188320 | ||||||||||
Attachments: |
|
Description
Christopher Cameron
2021-04-27 23:04:13 PDT
Created attachment 427308 [details]
basic test case
Created attachment 427309 [details]
Proof of concept patch that gets things working
Created attachment 427479 [details]
Now with ImageData support
Very excited to see this! There are a couple of things that changed from the proposal to what was agreed upon in the WhatWG PR. To draw your attention to them: * The PredefinedColorSpace interface to query for valid PredefinedColorSpaceEnum values is gone. There's just PredefinedColorSpace as an enum (with "srgb" and "display-p3" as options). * For ImageDataSettings, the PredefinedColorSpace is optional. The canvas methods getImageData and createImageData will use the color space of the canvas if colorSpace was not specified in ImageDataSettings. * The ImageBitmap part was taken out (ImageBitmapOptions will change to have an optional PredefinedColorSpace, rather than a required one, so that the ImageBitmap will default internally to "whatever is the best internal color space") I think that's it. We're working on upstreaming WPT tests for all of this. Feel free to reach out. (In reply to Christopher Cameron from comment #4) > Very excited to see this! > > There are a couple of things that changed from the proposal to what was > agreed upon in the WhatWG PR. To draw your attention to them: Great. Thanks for letting me know and continuing to drive this. Is that PR up for review anywhere? (In reply to Sam Weinig from comment #5) > (In reply to Christopher Cameron from comment #4) > > Very excited to see this! > > > > There are a couple of things that changed from the proposal to what was > > agreed upon in the WhatWG PR. To draw your attention to them: > > Great. Thanks for letting me know and continuing to drive this. > > Is that PR up for review anywhere? Found it. Better yet, it is now in main! https://github.com/whatwg/html/commit/85cb202a052c462bd6830b3dda96e7edbd1dcd75 Tracking initial support (no ImageData) in https://bugs.webkit.org/show_bug.cgi?id=225286. ImageData support now being worked on in https://bugs.webkit.org/show_bug.cgi?id=225841. Additional things to do after ImageData: - Ensure it works and add tests for drawing non-sRGB CanvasImageSources (image, videos, other canvases) into canvas (including patterns). - Ensure it works and add tests for drawing non-sRGB gradients. - Ensure it works and add tests for drawing non-sRGB shadows. We can consider this done. *** Bug 188320 has been marked as a duplicate of this bug. *** |