Bug 232671

Summary: [Catalina] HLS streams will not select HDR variants when GPU Process is enabled
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: MediaAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, pvollan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Jer Noble 2021-11-03 10:46:03 PDT
[Catalina] HLS streams will not select HDR variants when GPU Process is enabled
Comment 1 Jer Noble 2021-11-03 10:46:32 PDT
<rdar://84686676>
Comment 2 Jer Noble 2021-11-03 10:51:32 PDT
Created attachment 443212 [details]
Patch
Comment 3 Eric Carlson 2021-11-03 12:01:03 PDT
Comment on attachment 443212 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=443212&action=review

> Source/WebKit/GPUProcess/mac/GPUProcessMac.mm:88
> +    if (hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)) {

Nit: this comment is confusing, does "hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)" imply AVPlayer.videoRangeOverride isn't present?
Comment 4 Jer Noble 2021-11-03 12:11:01 PDT
(In reply to Eric Carlson from comment #3)
> Comment on attachment 443212 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=443212&action=review
> 
> > Source/WebKit/GPUProcess/mac/GPUProcessMac.mm:88
> > +    if (hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)) {
> 
> Nit: this comment is confusing, does
> "hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)"
> imply AVPlayer.videoRangeOverride isn't present?


No, it's the `#if !HAVE(AVPLAYER_VIDEORANGEOVERRIDE` above that does that. I can move the comment around.
Comment 5 Jer Noble 2021-11-03 12:35:33 PDT
Created attachment 443224 [details]
Patch for landing
Comment 6 EWS 2021-11-03 13:09:08 PDT
Committed r285219 (243844@main): <https://commits.webkit.org/243844@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 443224 [details].
Comment 7 Per Arne Vollan 2021-11-03 13:18:46 PDT
Comment on attachment 443224 [details]
Patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=443224&action=review

> Source/WebKit/GPUProcess/mac/GPUProcessMac.mm:94
> +    // This override is not necessary if AVFoundation is allowed to communicate
> +    // with the window server to query for HDR support.
> +    if (hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)) {
> +        setShouldOverrideScreenSupportsHighDynamicRange(false, false);
> +        return;
> +    }

This piece might not be needed, since I think hasProcessPrivilege will always return false in the GPU process for this privilege.