Bug 288020

Summary: [HDR] Add test infrastructure to enable HDR images in layout tests
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: ImagesAssignee: 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
Reported 2025-02-19 15:52:56 PST
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
Radar WebKit Bug Importer
Comment 1 2025-02-19 15:53:20 PST
Said Abou-Hallawa
Comment 2 2025-02-19 15:57:14 PST
Said Abou-Hallawa
Comment 3 2025-02-20 11:56:39 PST
Note You need to log in before you can comment on or make changes to this bug.