WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
215183
Preload graphics drivers in Mac WebProcess
https://bugs.webkit.org/show_bug.cgi?id=215183
Summary
Preload graphics drivers in Mac WebProcess
Ben Nham
Reported
2020-08-05 12:17:04 PDT
Asynchronously preload graphics drivers in Mac WebProcess
Attachments
Patch
(9.42 KB, patch)
2020-08-05 12:19 PDT
,
Ben Nham
no flags
Details
Formatted Diff
Diff
Patch
(7.32 KB, patch)
2020-08-05 12:35 PDT
,
Ben Nham
no flags
Details
Formatted Diff
Diff
Patch
(2.97 KB, patch)
2020-08-06 13:37 PDT
,
Ben Nham
no flags
Details
Formatted Diff
Diff
Patch
(3.12 KB, patch)
2020-08-07 17:55 PDT
,
Ben Nham
no flags
Details
Formatted Diff
Diff
Patch
(3.03 KB, patch)
2020-08-08 16:10 PDT
,
Ben Nham
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Ben Nham
Comment 1
2020-08-05 12:19:32 PDT
Created
attachment 406023
[details]
Patch
Radar WebKit Bug Importer
Comment 2
2020-08-05 12:20:19 PDT
<
rdar://problem/66587606
>
Ben Nham
Comment 3
2020-08-05 12:35:52 PDT
Created
attachment 406025
[details]
Patch
Simon Fraser (smfr)
Comment 4
2020-08-05 13:54:47 PDT
Comment on
attachment 406025
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=406025&action=review
> Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:227 > + if (settings.acceleratedDrawingEnabled()) {
I would not bother checking this. It's the default, and even if it isn't, canvas or WebGL can use Metal.
Tim Horton
Comment 5
2020-08-05 17:46:14 PDT
Also, Darin will show up shortly to tell you that you don’t need the dispatch_once since this code is already not threadsafe; just use a static bool.
Ben Nham
Comment 6
2020-08-05 17:48:43 PDT
If I don't need to check the setting, then I'll probably move this to earlier in the init process (e.g. to WebProcess::platformInitializeWebProcess or WebProcess::platformSetWebsiteDataStoreParameters).
Tim Horton
Comment 7
2020-08-05 17:57:53 PDT
Definitely don't need to.
Ben Nham
Comment 8
2020-08-06 13:37:31 PDT
Created
attachment 406110
[details]
Patch
Alexey Proskuryakov
Comment 9
2020-08-07 10:45:27 PDT
Comment on
attachment 406110
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=406110&action=review
> Source/WebCore/page/ProcessWarming.cpp:47 > +#include <Metal/Metal.h>
Looks like this is an Objective-C header.
Alexey Proskuryakov
Comment 10
2020-08-07 10:45:53 PDT
(so the patch breaks the build)
Geoffrey Garen
Comment 11
2020-08-07 13:05:56 PDT
Comment on
attachment 406110
[details]
Patch Seems like you could call WebCore::GPUDevice::tryCreate() to make this behavior C++-friendly.
Ben Nham
Comment 12
2020-08-07 17:55:58 PDT
Created
attachment 406236
[details]
Patch
Ben Nham
Comment 13
2020-08-08 14:55:03 PDT
Comment on
attachment 406236
[details]
Patch I profiled CompPLT with this patch applied and now see all MTLCopyAllDevices work happening in prewarmGlobally as expected.
Darin Adler
Comment 14
2020-08-08 15:02:50 PDT
Comment on
attachment 406236
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=406236&action=review
> Source/WebCore/page/ProcessWarming.cpp:89 > + GPUDevice::tryCreate(gpuRequestAdapterOptions);
Why is the local variable needed? Isn’t this the same as passing WTF::nullopt?
Ben Nham
Comment 15
2020-08-08 16:10:07 PDT
Created
attachment 406261
[details]
Patch
EWS
Comment 16
2020-08-09 11:23:49 PDT
Committed
r265418
: <
https://trac.webkit.org/changeset/265418
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 406261
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug