Bug 219431 - GPU Process WindowServer blocking prevents CGL
Summary: GPU Process WindowServer blocking prevents CGL
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kimmo Kinnunen
URL:
Keywords: InRadar
Depends on:
Blocks: webglgpup 217216
  Show dependency treegraph
 
Reported: 2020-12-02 07:17 PST by Kimmo Kinnunen
Modified: 2020-12-04 07:44 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.96 KB, patch)
2020-12-03 06:00 PST, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch (1.47 KB, patch)
2020-12-04 04:17 PST, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch (1.47 KB, patch)
2020-12-04 04:22 PST, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kimmo Kinnunen 2020-12-02 07:17:54 PST
GPU Process WindowServer blocking prevents CGL

Currently block is done with setApplicationIsDaemon

I managed to use the Web Process method of blocking WindowServer on iMac Pro
I failed to use the method on MacBook with Intel/AMD
Comment 1 Radar WebKit Bug Importer 2020-12-02 07:18:03 PST
<rdar://problem/71893390>
Comment 2 Kimmo Kinnunen 2020-12-03 06:00:44 PST
Created attachment 415299 [details]
Patch
Comment 3 Darin Adler 2020-12-03 10:59:00 PST
Comment on attachment 415299 [details]
Patch

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

> Source/WebKit/GPUProcess/mac/GPUProcessMac.mm:48
> +    auto retval = CGSSetDenyWindowServerConnections(true);

Not really WebKit style to use the name "retval" and I would prefer "result", "returnValue", or "errorCode", or even "error".
Comment 4 Kimmo Kinnunen 2020-12-04 04:17:59 PST
Created attachment 415406 [details]
Patch
Comment 5 Kimmo Kinnunen 2020-12-04 04:20:47 PST
Thanks for the review. Per Arne found a proper fix.

The GPU Process property list was missing allowing the automatic graphics switching. It's unknown if this is intended limitation or accidental error in CGL.
Comment 6 Kimmo Kinnunen 2020-12-04 04:22:11 PST
Created attachment 415407 [details]
Patch
Comment 7 Per Arne Vollan 2020-12-04 05:02:12 PST
Comment on attachment 415407 [details]
Patch

R=me. I think the build failures are unrelated.
Comment 8 EWS 2020-12-04 07:44:06 PST
Committed r270430: <https://trac.webkit.org/changeset/270430>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 415407 [details].