Bug 199844 - Make ANGLE work inside WebKit2's sandbox
Summary: Make ANGLE work inside WebKit2's sandbox
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Nightly Build
Hardware: Mac All
: P2 Normal
Assignee: Kenneth Russell
Keywords: InRadar
Depends on:
Blocks: webglangle
  Show dependency treegraph
Reported: 2019-07-16 16:51 PDT by Kenneth Russell
Modified: 2019-07-17 10:50 PDT (History)
9 users (show)

See Also:

Patch (24.22 KB, patch)
2019-07-16 17:01 PDT, Kenneth Russell
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews212 for win-future (13.75 MB, application/zip)
2019-07-16 18:45 PDT, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Russell 2019-07-16 16:51:10 PDT
WebKit's current ANGLE snapshot doesn't work inside WebKit2's sandbox because it makes a deprecated API call, CGDisplayIOServicePort, which is only used to determine the "active" GPU on dual-GPU MacBook Pros. It doesn't otherwise impact ANGLE's internal logic, nor consumers like WebCore. Top-of-tree ANGLE has removed this API call in http://crbug.com/angleproject/3383 . Cherry-picking that commit makes WebKit's ANGLE backend for WebGL work in WebKit2.
Comment 1 Kenneth Russell 2019-07-16 17:01:08 PDT
Created attachment 374264 [details]
Comment 2 EWS Watchlist 2019-07-16 17:03:42 PDT
Note that there are important steps to take when updating ANGLE. See http://trac.webkit.org/wiki/UpdatingANGLE
Comment 3 Kenneth Russell 2019-07-16 17:04:22 PDT
The attached patch is just an application of https://chromium-review.googlesource.com/1584360 with one merge conflict resolved, and also a tiny fix to WebGLLayer.mm fixing a build failure with USE_ANGLE=1 that I introduced at the last minute in my most recent patch (sorry!). It makes WebKit's ANGLE / WebGL backend run in WebKit2 mode in the minibrowser.
Comment 4 EWS Watchlist 2019-07-16 18:45:23 PDT
Comment on attachment 374264 [details]

Attachment 374264 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/12754839

New failing tests:
Comment 5 EWS Watchlist 2019-07-16 18:45:25 PDT
Created attachment 374269 [details]
Archive of layout-test-results from ews212 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews212  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 6 Alexey Proskuryakov 2019-07-16 20:49:26 PDT
Could you please elaborate on what the user visible issue is? If we didn’t notice a full “doesn’t work”, that would be sad and surprising.
Comment 7 Radar WebKit Bug Importer 2019-07-16 20:49:48 PDT
Comment 8 Alex Christensen 2019-07-17 10:22:10 PDT
Comment on attachment 374264 [details]

Kenneth is working on a WebGL implementation that not only uses ANGLE for shader translation, but also for rendering instead of using OpenGL/OpenGLES directly like we do now.  This affects that WebGL implementation.  ANGLE as a text-in-text-out translator does not need this change, so shipping WebGL is not broken and is unaffected by this patch.  r=me
Comment 9 WebKit Commit Bot 2019-07-17 10:50:51 PDT
Comment on attachment 374264 [details]

Clearing flags on attachment: 374264

Committed r247521: <https://trac.webkit.org/changeset/247521>
Comment 10 WebKit Commit Bot 2019-07-17 10:50:53 PDT
All reviewed patches have been landed.  Closing bug.