Bug 313600
| Summary: | [HDR] Replace ShouldDecodeToHDR with DecodingDestination | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> |
| Component: | Images | Assignee: | Said Abou-Hallawa <sabouhallawa> |
| 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: | 301434 | ||
Said Abou-Hallawa
ShouldDecodeToHDR allows two decoding options for HDRness: No and Yes. For ShouldDecodeToHDR::Yes we set the option { key: kCGImageSourceDecodeRequest, value: kCGImageSourceDecodeToHDR } when calling CGImageSourceCreateImageAtIndex() or CGImageSourceCreateThumbnailAtIndex().
For decoding gain-map images, we need a third option. We need to decode the base image but we need to decode the gain-map image as well. For this purpose the enum ShouldDecodeToHDR will be replaced with another enum called DecodingDestination. The values of DecodingDestination are { Base, GainMap, HDR }.
For Base and GainMap, the base image will be decoded, i.e. sending { key: kCGImageSourceDecodeRequest, value: kCGImageSourceDecodeToSDR } to CGImageSource. But for GainMap, the gain-map image will be decoded also. For HDR, { key: kCGImageSourceDecodeRequest, value: kCGImageSourceDecodeToHDR } will be send to CGImageSource.
DecodingDestination::GainMap will be chosen only when the image has a gain-map and the context is remote, i.e. the actual display happens in GPUProcess. If the image has a gain-map but the context is local, DecodingDestination::HDR will be chosen. This means the gain-map is applied in WebContent process in this case.
ImageFrame will now have three slots for three possible destinations. DecodingOptions will hold DecodingDestination and it will use it to check for matching.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/175805956>
Said Abou-Hallawa
Pull request: https://github.com/WebKit/WebKit/pull/64255
EWS
Committed 312893@main (8d2285e7bc8e): <https://commits.webkit.org/312893@main>
Reviewed commits have been landed. Closing PR #64255 and removing active labels.