Bug 249446 - color space of certain videos drawn to canvas does not match source video
Summary: color space of certain videos drawn to canvas does not match source video
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Cameron McCormack (:heycam)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-15 21:15 PST by Cameron McCormack (:heycam)
Modified: 2022-12-16 19:03 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.