WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
225140
Add support for display-p3 canvas and ImageData
https://bugs.webkit.org/show_bug.cgi?id=225140
Summary
Add support for display-p3 canvas and ImageData
Christopher Cameron
Reported
2021-04-27 23:04:13 PDT
Proposal document:
https://github.com/WICG/canvas-color-space/blob/main/CanvasColorSpaceProposal.md
Syntax for creating such a canvas is var context = canvas.getContext('2d', {colorSpace:'display-p3'}); Similar syntax for use with ImageData. Corresponding bugs: Chromium: crbug.com/1083693 Mozilla:
https://bugzilla.mozilla.org/show_bug.cgi?id=1703654
Attachments
basic test case
(3.39 KB, text/html)
2021-04-28 16:51 PDT
,
Sam Weinig
no flags
Details
Proof of concept patch that gets things working
(51.27 KB, patch)
2021-04-28 16:54 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Now with ImageData support
(126.94 KB, patch)
2021-04-30 18:25 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2021-04-28 16:51:47 PDT
Created
attachment 427308
[details]
basic test case
Sam Weinig
Comment 2
2021-04-28 16:54:54 PDT
Created
attachment 427309
[details]
Proof of concept patch that gets things working
Sam Weinig
Comment 3
2021-04-30 18:25:12 PDT
Created
attachment 427479
[details]
Now with ImageData support
Christopher Cameron
Comment 4
2021-05-01 16:23:55 PDT
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.
Sam Weinig
Comment 5
2021-05-02 10:39:55 PDT
(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?
Sam Weinig
Comment 6
2021-05-03 16:43:07 PDT
(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
Sam Weinig
Comment 7
2021-05-03 16:44:06 PDT
Tracking initial support (no ImageData) in
https://bugs.webkit.org/show_bug.cgi?id=225286
.
Radar WebKit Bug Importer
Comment 8
2021-05-04 23:05:16 PDT
<
rdar://problem/77542907
>
Sam Weinig
Comment 9
2021-05-14 21:05:38 PDT
ImageData support now being worked on in
https://bugs.webkit.org/show_bug.cgi?id=225841
.
Sam Weinig
Comment 10
2021-05-14 21:13:18 PDT
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.
Cameron McCormack (:heycam)
Comment 11
2022-08-05 17:35:14 PDT
We can consider this done.
Cameron McCormack (:heycam)
Comment 12
2022-08-05 17:36:12 PDT
***
Bug 188320
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug