Title: [269956] trunk/Source/WebKit
- Revision
- 269956
- Author
- [email protected]
- Date
- 2020-11-18 07:36:33 -0800 (Wed, 18 Nov 2020)
Log Message
[GPUProcess] Main thread of the GPUProcess should have same priority as main thread of the WebContent
https://bugs.webkit.org/show_bug.cgi?id=219057
Reviewed by Simon Fraser.
Main thread of the GPUProcess should have same priority as main thread of the WebContent since it
is doing rendering on its behalf.
For now, this means that on macOS, the main threads of the GPU and WebContent processes with both
get UserInteractive QoS. On iOS, they will both still get UserInitiated QoS until our RunningBoard
foreground process assertion get fixed to get the right priority (<rdar://problem/71499731>).
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist:
Use _ProcessType=App, similarly as what we do for the WebContent process. If we don't do
this, the process is an adaptive daemon and its QoS can never be higher than UserInitiated.
We need its priority to go to UserInteractive to match the WebContent process.
* GPUProcess/GPUProcess.cpp:
(WebKit::GPUProcess::initializeGPUProcess):
Request UserInteractive QoS for the main thread of the GPUProcess, similarly to what we do
for the main thread of the WebContent process already in WebProcess::InitializeWebProcess().
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (269955 => 269956)
--- trunk/Source/WebKit/ChangeLog 2020-11-18 15:11:28 UTC (rev 269955)
+++ trunk/Source/WebKit/ChangeLog 2020-11-18 15:36:33 UTC (rev 269956)
@@ -1,3 +1,27 @@
+2020-11-18 Chris Dumez <[email protected]>
+
+ [GPUProcess] Main thread of the GPUProcess should have same priority as main thread of the WebContent
+ https://bugs.webkit.org/show_bug.cgi?id=219057
+
+ Reviewed by Simon Fraser.
+
+ Main thread of the GPUProcess should have same priority as main thread of the WebContent since it
+ is doing rendering on its behalf.
+
+ For now, this means that on macOS, the main threads of the GPU and WebContent processes with both
+ get UserInteractive QoS. On iOS, they will both still get UserInitiated QoS until our RunningBoard
+ foreground process assertion get fixed to get the right priority (<rdar://problem/71499731>).
+
+ * GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist:
+ Use _ProcessType=App, similarly as what we do for the WebContent process. If we don't do
+ this, the process is an adaptive daemon and its QoS can never be higher than UserInitiated.
+ We need its priority to go to UserInteractive to match the WebContent process.
+
+ * GPUProcess/GPUProcess.cpp:
+ (WebKit::GPUProcess::initializeGPUProcess):
+ Request UserInteractive QoS for the main thread of the GPUProcess, similarly to what we do
+ for the main thread of the WebContent process already in WebProcess::InitializeWebProcess().
+
2020-11-18 Sam Weinig <[email protected]>
Address additional feedback from https://bugs.webkit.org/show_bug.cgi?id=218960
Modified: trunk/Source/WebKit/GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist (269955 => 269956)
--- trunk/Source/WebKit/GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist 2020-11-18 15:11:28 UTC (rev 269955)
+++ trunk/Source/WebKit/GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist 2020-11-18 15:36:33 UTC (rev 269956)
@@ -36,6 +36,8 @@
<true/>
<key>RunLoopType</key>
<string>NSRunLoop</string>
+ <key>_ProcessType</key>
+ <string>App</string>
<key>_MultipleInstances</key>
<true/>
</dict>
Modified: trunk/Source/WebKit/GPUProcess/GPUProcess.cpp (269955 => 269956)
--- trunk/Source/WebKit/GPUProcess/GPUProcess.cpp 2020-11-18 15:11:28 UTC (rev 269955)
+++ trunk/Source/WebKit/GPUProcess/GPUProcess.cpp 2020-11-18 15:36:33 UTC (rev 269956)
@@ -155,6 +155,9 @@
send(Messages::GPUProcessProxy::DidCreateContextForVisibilityPropagation(m_contextForVisibilityPropagation->contextID()));
#endif
+ // Match the QoS of the UIProcess since the GPU process is doing rendering on its behalf.
+ WTF::Thread::setCurrentThreadIsUserInteractive(0);
+
WebCore::setPresentingApplicationPID(parameters.parentPID);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes