Bug 249446

Summary: color space of certain videos drawn to canvas does not match source video
Product: WebKit Reporter: Cameron McCormack (:heycam) <heycam>
Component: Layout and RenderingAssignee: Cameron McCormack (:heycam) <heycam>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Cameron McCormack (:heycam) 2022-12-15 21:15:41 PST
For historical reasons, CoreAnimation will adjust certain video color spaces when displaying the video. If we draw such a video to a canvas, in certain circumstances (if the size of the drawn image is small enough, and we have an accelerated canvas), it will be drawn with an unadjusted color space, resulting in pixel values that don't match the original video. There are pages that like to use canvas to compute a background color from a video to set on the surrounding page, and if we run into this issue, the color will be slightly off.
Comment 1 Cameron McCormack (:heycam) 2022-12-15 21:16:12 PST
rdar://88804270
Comment 2 Cameron McCormack (:heycam) 2022-12-15 21:19:39 PST
Pull request: https://github.com/WebKit/WebKit/pull/7731
Comment 3 EWS 2022-12-16 19:03:06 PST
Committed 258030@main (07a9869a62aa): <https://commits.webkit.org/258030@main>

Reviewed commits have been landed. Closing PR #7731 and removing active labels.