Bug 229023

Summary: Support patterns with a wide gamut source
Product: WebKit Reporter: Cameron McCormack (:heycam) <heycam>
Component: CanvasAssignee: Cameron McCormack (:heycam) <heycam>
Status: RESOLVED FIXED    
Severity: Normal CC: alecflett, beidson, benjamin, cdumez, changseok, clopez, cmarcelo, dino, esprehn+autocc, ews-watchlist, gyuyoung.kim, jsbell, kondapallykalyan, sam, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://github.com/web-platform-tests/wpt/pull/30836
Bug Depends on:    
Bug Blocks: 225140    
Attachments:
Description Flags
Patch including squashed dependencies for EWS
none
Patch for review, without dependencies (which will fail EWS)
none
Patch
none
Patch none

Description Cameron McCormack (:heycam) 2021-08-11 21:37:23 PDT
.
Comment 1 Radar WebKit Bug Importer 2021-08-11 21:40:46 PDT
<rdar://problem/81828466>
Comment 2 Cameron McCormack (:heycam) 2021-08-19 18:11:29 PDT
This works with GPUP canvas drawing disabled.
Comment 3 Cameron McCormack (:heycam) 2021-09-12 21:22:29 PDT
Created attachment 438009 [details]
Patch including squashed dependencies for EWS
Comment 4 EWS Watchlist 2021-09-12 21:23:18 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 5 Cameron McCormack (:heycam) 2021-09-12 21:23:41 PDT
Created attachment 438010 [details]
Patch for review, without dependencies (which will fail EWS)
Comment 6 Sam Weinig 2021-09-15 09:30:38 PDT
Comment on attachment 438010 [details]
Patch for review, without dependencies (which will fail EWS)

View in context: https://bugs.webkit.org/attachment.cgi?id=438010&action=review

> Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:469
> +        auto bitmap = ShareableBitmap::createShareable(resultSize, { imageBuffer->colorSpace() });

A great follow up would be to make the ShareableBitmap's configuration colorspace not optional, requiring each callsite to explicitly specify it. This has been a useful pattern in finding places where sRGB is implicit that can otherwise be hard to find.
Comment 7 Cameron McCormack (:heycam) 2021-09-16 16:41:26 PDT
(In reply to Sam Weinig from comment #6)
> A great follow up would be to make the ShareableBitmap's configuration
> colorspace not optional, requiring each callsite to explicitly specify it.
> This has been a useful pattern in finding places where sRGB is implicit that
> can otherwise be hard to find.

Filed bug 230381 for that.
Comment 8 Cameron McCormack (:heycam) 2021-09-16 16:44:12 PDT
Created attachment 438418 [details]
Patch
Comment 9 Cameron McCormack (:heycam) 2021-09-16 19:01:12 PDT
Created attachment 438429 [details]
Patch
Comment 10 Cameron McCormack (:heycam) 2021-09-16 19:02:43 PDT
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/30836
Comment 11 EWS 2021-09-16 19:54:36 PDT
Committed r282630 (241787@main): <https://commits.webkit.org/241787@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 438429 [details].