Bug 288020
Summary: | [HDR] Add test infrastructure to enable HDR images in layout tests | ||
---|---|---|---|
Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> |
Component: | Images | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | sabouhallawa, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 282299 |
Said Abou-Hallawa
Two things will be added to support HDR images in layout tests:
1. An internal API called setHeadroomForTesting() will be added. The inputs are HTMLImageElement and a headroom as a float. This API will will override the image headroom value. So if we want to make an SDR image pretend to be an HDR image, we need to make call like this:
internals.setHeadroomForTesting(image, 5);
This API will eventually sets an std::optional<Headroom> member in BitmapImageSource. This setting will force the CALayer to be an HDR layer. Plus it will change the display of this image.
2. To test the display of the HDR image, BitmapImage::draw() will check if setHeadroomForTesting() was called for this image. And if this happened, it will display a golden rectangle regardless of the original contents.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/145173897>
Said Abou-Hallawa
https://github.com/WebKit/WebKit/pull/40917
Said Abou-Hallawa
Committed 290704@main (0f0ff23): https://commits.webkit.org/290704@main