Changeset 267516 in webkit
- Timestamp:
- Sep 23, 2020, 8:36:48 PM (4 years ago)
- Location:
- trunk/Source
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r267515 r267516 1 2020-09-23 Peng Liu <peng.liu6@apple.com> 2 3 Add feature flags for GPU Process features 4 https://bugs.webkit.org/show_bug.cgi?id=216901 5 6 Reviewed by Tim Horton. 7 8 Rename useGPUProcessForMedia to useGPUProcessForMediaEnabled. 9 10 No new tests since no functional changes. 11 12 * page/Settings.yaml: 13 1 14 2020-09-23 Zalan Bujtas <zalan@apple.com> 2 15 -
trunk/Source/WebCore/page/Settings.yaml
r267472 r267516 333 333 initial: false 334 334 conditional: ENABLE(VIDEO) 335 useGPUProcessForMedia :335 useGPUProcessForMediaEnabled: 336 336 initial: false 337 337 conditional: ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/ChangeLog
r267504 r267516 1 2020-09-23 Peng Liu <peng.liu6@apple.com> 2 3 Add feature flags for GPU Process features 4 https://bugs.webkit.org/show_bug.cgi?id=216901 5 6 Reviewed by Tim Horton. 7 8 Add feature flags for the following GPU Process features: 9 - 2D canvas in GPU process 10 - WebGL in GPU process 11 - DOM rendering in GPU Process 12 13 Also, clean up some related feature/function names. 14 15 * FeatureFlags/WebKit.plist: 16 Add keys for the GPU process features and sort all keys. 17 18 * Shared/WebPreferencesDefaultValues.cpp: 19 (WebKit::defaultUseGPUProcessForCanvasRenderingEnabled): 20 (WebKit::defaultUseGPUProcessForDOMRenderingEnabled): 21 (WebKit::defaultUseGPUProcessForMediaEnabled): 22 (WebKit::defaultUseGPUProcessForWebGLEnabled): 23 (WebKit::defaultCaptureAudioInGPUProcessEnabled): 24 (WebKit::defaultCaptureVideoInGPUProcessEnabled): 25 (WebKit::defaultWebRTCCodecsInGPUProcess): 26 (WebKit::defaultUseGPUProcessForMedia): Deleted. 27 (WebKit::defaultRenderCanvasInGPUProcessEnabled): Deleted. 28 * Shared/WebPreferencesDefaultValues.h: 29 * Shared/WebPreferencesInternal.yaml: 30 Add preferences and corresponding default values. 31 32 * Shared/WebProcessCreationParameters.h: 33 * UIProcess/Cocoa/WebProcessPoolCocoa.mm: 34 (WebKit::WebProcessPool::platformInitializeWebProcess): 35 Rename useGPUProcessForMedia to useGPUProcessForMediaEnabled. 36 37 * UIProcess/WebPageProxy.cpp: 38 (WebKit::WebPageProxy::creationParameters): 39 Use useGPUProcessForCanvasRenderingEnabled instead of renderCanvasInGPUProcessEnabled. 40 41 * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp: 42 (WebKit::RemoteMediaPlayerManager::updatePreferences): 43 Use useGPUProcessForMediaEnabled instead of useGPUProcessForMedia. 44 45 * WebProcess/InjectedBundle/InjectedBundle.cpp: 46 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Ditto. 47 48 * WebProcess/WebPage/WebPage.cpp: 49 (WebKit::m_limitsNavigationsToAppBoundDomains): Ditto. 50 (WebKit::WebPage::updatePreferences): Ditto. 51 1 52 2020-09-23 Chris Dumez <cdumez@apple.com> 2 53 -
trunk/Source/WebKit/FeatureFlags/WebKit.plist
r265533 r267516 8 8 <true/> 9 9 </dict> 10 <key>canvas_and_media_in_gpu_process</key> 10 <key>gpu_process_canvas_rendering</key> 11 <dict> 12 <key>Enabled</key> 13 <false/> 14 </dict> 15 <key>gpu_process_dom_rendering</key> 16 <dict> 17 <key>Enabled</key> 18 <false/> 19 </dict> 20 <key>gpu_process_media</key> 21 <dict> 22 <key>Enabled</key> 23 <false/> 24 </dict> 25 <key>gpu_process_webgl</key> 26 <dict> 27 <key>Enabled</key> 28 <false/> 29 </dict> 30 <key>gpu_process_webrtc</key> 11 31 <dict> 12 32 <key>Enabled</key> … … 28 48 <false/> 29 49 </dict> 50 <key>sw_vp9_decoder_on_battery</key> 51 <dict> 52 <key>Enabled</key> 53 <false/> 54 </dict> 55 <key>vp9_decoder</key> 56 <dict> 57 <key>Enabled</key> 58 <true/> 59 </dict> 30 60 <key>WebGL2</key> 31 61 <dict> … … 43 73 <false/> 44 74 </dict> 45 <key>webrtc_in_gpu_process</key>46 <dict>47 <key>Enabled</key>48 <false/>49 </dict>50 <key>vp9_decoder</key>51 <dict>52 <key>Enabled</key>53 <true/>54 </dict>55 <key>sw_vp9_decoder_on_battery</key>56 <dict>57 <key>Enabled</key>58 <false/>59 </dict>60 75 <key>webm_parser</key> 61 76 <dict> -
trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
r267414 r267516 113 113 #if ENABLE(GPU_PROCESS) 114 114 115 bool defaultUseGPUProcessForMedia() 116 { 117 #if HAVE(SYSTEM_FEATURE_FLAGS) 118 return isFeatureFlagEnabled("canvas_and_media_in_gpu_process"); 115 bool defaultUseGPUProcessForCanvasRenderingEnabled() 116 { 117 #if HAVE(SYSTEM_FEATURE_FLAGS) 118 return isFeatureFlagEnabled("gpu_process_canvas_rendering"); 119 #endif 120 121 return false; 122 } 123 124 bool defaultUseGPUProcessForDOMRenderingEnabled() 125 { 126 #if HAVE(SYSTEM_FEATURE_FLAGS) 127 return isFeatureFlagEnabled("gpu_process_dom_rendering"); 128 #endif 129 130 return false; 131 } 132 133 bool defaultUseGPUProcessForMediaEnabled() 134 { 135 #if HAVE(SYSTEM_FEATURE_FLAGS) 136 return isFeatureFlagEnabled("gpu_process_media"); 137 #endif 138 139 return false; 140 } 141 142 bool defaultUseGPUProcessForWebGLEnabled() 143 { 144 #if HAVE(SYSTEM_FEATURE_FLAGS) 145 return isFeatureFlagEnabled("gpu_process_webgl"); 119 146 #endif 120 147 … … 124 151 #endif // ENABLE(GPU_PROCESS) 125 152 126 bool defaultRenderCanvasInGPUProcessEnabled()127 {128 #if HAVE(SYSTEM_FEATURE_FLAGS)129 return isFeatureFlagEnabled("canvas_and_media_in_gpu_process");130 #endif131 132 return false;133 }134 135 153 #if ENABLE(MEDIA_STREAM) 136 154 … … 138 156 { 139 157 #if PLATFORM(MAC) && HAVE(SYSTEM_FEATURE_FLAGS) 140 return isFeatureFlagEnabled(" webrtc_in_gpu_process");158 return isFeatureFlagEnabled("gpu_process_webrtc"); 141 159 #endif 142 160 … … 164 182 { 165 183 #if HAVE(SYSTEM_FEATURE_FLAGS) 166 return isFeatureFlagEnabled(" webrtc_in_gpu_process");184 return isFeatureFlagEnabled("gpu_process_webrtc"); 167 185 #endif 168 186 … … 186 204 { 187 205 #if HAVE(SYSTEM_FEATURE_FLAGS) 188 return isFeatureFlagEnabled(" webrtc_in_gpu_process");206 return isFeatureFlagEnabled("gpu_process_webrtc"); 189 207 #endif 190 208 -
trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h
r267414 r267516 336 336 337 337 #if ENABLE(GPU_PROCESS) 338 bool defaultUseGPUProcessForMedia(); 339 #endif 340 341 bool defaultRenderCanvasInGPUProcessEnabled(); 338 bool defaultUseGPUProcessForCanvasRenderingEnabled(); 339 bool defaultUseGPUProcessForDOMRenderingEnabled(); 340 bool defaultUseGPUProcessForMediaEnabled(); 341 bool defaultUseGPUProcessForWebGLEnabled(); 342 #endif 342 343 343 344 #if ENABLE(MEDIA_STREAM) -
trunk/Source/WebKit/Shared/WebPreferencesInternal.yaml
r267504 r267516 331 331 condition: ENABLE(LAYOUT_FORMATTING_CONTEXT) 332 332 333 RenderCanvasInGPUProcessEnabled:334 type: bool335 defaultValue: defaultRenderCanvasInGPUProcessEnabled()336 humanReadableName: "Use GPU Process to render canvas"337 humanReadableDescription: "Enable canvas rendering in GPU Process"338 webcoreBinding: none339 340 333 RestrictedHTTPResponseAccess: 341 334 type: bool … … 418 411 humanReadableDescription: "Remove all non-cookie website data after just 30 seconds of no user interaction when Intelligent Tracking Prevention is enabled" 419 412 420 UseGPUProcessFor Media:421 type: bool 422 defaultValue: defaultUseGPUProcessFor Media()413 UseGPUProcessForCanvasRenderingEnabled: 414 type: bool 415 defaultValue: defaultUseGPUProcessForCanvasRenderingEnabled() 423 416 condition: ENABLE(GPU_PROCESS) 424 humanReadableName: "Use GPU Process for media" 417 humanReadableName: "GPU Process: Canvas Rendering" 418 humanReadableDescription: "Enable canvas rendering in GPU Process" 419 webcoreBinding: none 420 421 UseGPUProcessForDOMRenderingEnabled: 422 type: bool 423 defaultValue: defaultUseGPUProcessForDOMRenderingEnabled() 424 condition: ENABLE(GPU_PROCESS) 425 humanReadableName: "GPU Process: DOM Rendering" 426 humanReadableDescription: "Enable DOM rendering in GPU Process" 427 webcoreBinding: none 428 429 UseGPUProcessForMediaEnabled: 430 type: bool 431 defaultValue: defaultUseGPUProcessForMediaEnabled() 432 condition: ENABLE(GPU_PROCESS) 433 humanReadableName: "GPU Process: Media" 425 434 humanReadableDescription: "Do all media loading and playback in the GPU Process" 426 webcoreName: useGPUProcessForMedia 435 webcoreName: useGPUProcessForMediaEnabled 436 437 UseGPUProcessForWebGLEnabled: 438 type: bool 439 defaultValue: defaultUseGPUProcessForWebGLEnabled() 440 condition: ENABLE(GPU_PROCESS) 441 humanReadableName: "GPU Process: WebGL" 442 humanReadableDescription: "Enable WebGL in GPU Process" 443 webcoreBinding: none 427 444 428 445 LiveRangeSelectionEnabled: -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
r267498 r267516 125 125 bool memoryCacheDisabled { false }; 126 126 bool attrStyleEnabled { false }; 127 bool useGPUProcessForMedia { false };127 bool useGPUProcessForMediaEnabled { false }; 128 128 129 129 #if ENABLE(SERVICE_CONTROLS) -
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
r267498 r267516 452 452 parameters.localizedDeviceModel = localizedDeviceModel(); 453 453 #endif 454 454 455 455 // Allow microphone access if either preference is set because WebRTC requires microphone access. 456 bool needWebProcessExtensions = !m_defaultPageGroup->preferences().useGPUProcessForMedia ()456 bool needWebProcessExtensions = !m_defaultPageGroup->preferences().useGPUProcessForMediaEnabled() 457 457 || !m_defaultPageGroup->preferences().captureAudioInGPUProcessEnabled() 458 458 || !m_defaultPageGroup->preferences().captureVideoInGPUProcessEnabled(); -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r267431 r267516 7929 7929 parameters.shouldCaptureVideoInUIProcess = preferences().captureVideoInUIProcessEnabled(); 7930 7930 parameters.shouldCaptureVideoInGPUProcess = preferences().captureVideoInGPUProcessEnabled(); 7931 parameters.shouldRenderCanvasInGPUProcess = preferences(). renderCanvasInGPUProcessEnabled();7931 parameters.shouldRenderCanvasInGPUProcess = preferences().useGPUProcessForCanvasRenderingEnabled(); 7932 7932 parameters.shouldEnableVP9Decoder = preferences().vp9DecoderEnabled(); 7933 7933 #if ENABLE(VP9) && PLATFORM(COCOA) -
trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp
r262695 r267516 266 266 }; 267 267 268 RemoteMediaPlayerSupport::setRegisterRemotePlayerCallback(settings.useGPUProcessForMedia () ? WTFMove(registerEngine) : RemoteMediaPlayerSupport::RegisterRemotePlayerCallback());268 RemoteMediaPlayerSupport::setRegisterRemotePlayerCallback(settings.useGPUProcessForMediaEnabled() ? WTFMove(registerEngine) : RemoteMediaPlayerSupport::RegisterRemotePlayerCallback()); 269 269 270 270 #if PLATFORM(COCOA) && ENABLE(MEDIA_STREAM) 271 if (settings.useGPUProcessForMedia ()) {271 if (settings.useGPUProcessForMediaEnabled()) { 272 272 WebCore::SampleBufferDisplayLayer::setCreator([](auto& client) { 273 273 return WebProcess::singleton().ensureGPUProcessConnection().sampleBufferDisplayLayerManager().createLayer(client); -
trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
r267188 r267516 224 224 225 225 #if ENABLE(GPU_PROCESS) 226 if (preference == "WebKitUseGPUProcessForMedia " || preference == "WebKitCaptureAudioInGPUProcessEnabledKey") {227 WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::useGPUProcessForMedia Key(), enabled);228 for (auto* page : pages) 229 page->settings().setUseGPUProcessForMedia (enabled);226 if (preference == "WebKitUseGPUProcessForMediaEnabled" || preference == "WebKitCaptureAudioInGPUProcessEnabledKey") { 227 WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::useGPUProcessForMediaEnabledKey(), enabled); 228 for (auto* page : pages) 229 page->settings().setUseGPUProcessForMediaEnabled(enabled); 230 230 return; 231 231 } -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r267249 r267516 580 580 581 581 #if PLATFORM(IOS_FAMILY) || ENABLE(ROUTING_ARBITRATION) 582 if (!m_page->settings().useGPUProcessForMedia ())582 if (!m_page->settings().useGPUProcessForMediaEnabled()) 583 583 DeprecatedGlobalSettings::setShouldManageAudioSessionCategory(true); 584 584 #endif … … 784 784 785 785 #if ENABLE(GPU_PROCESS) 786 if (m_page->settings().useGPUProcessForMedia ())786 if (m_page->settings().useGPUProcessForMediaEnabled()) 787 787 WebProcess::singleton().ensureGPUProcessConnection().updateParameters(parameters); 788 788 #endif … … 3785 3785 3786 3786 #if ENABLE(GPU_PROCESS) 3787 // FIXME: useGPUProcessForMedia should be a RuntimeEnabledFeature since it's global.3788 static_cast<WebMediaStrategy&>(platformStrategies()->mediaStrategy()).setUseGPUProcess(settings.useGPUProcessForMedia ());3787 // FIXME: useGPUProcessForMediaEnabled should be a RuntimeEnabledFeature since it's global. 3788 static_cast<WebMediaStrategy&>(platformStrategies()->mediaStrategy()).setUseGPUProcess(settings.useGPUProcessForMediaEnabled()); 3789 3789 WebProcess::singleton().supplement<RemoteMediaPlayerManager>()->updatePreferences(settings); 3790 WebProcess::singleton().setUseGPUProcessForMedia(settings.useGPUProcessForMedia ());3790 WebProcess::singleton().setUseGPUProcessForMedia(settings.useGPUProcessForMediaEnabled()); 3791 3791 #endif 3792 3792 } -
trunk/Source/WebKitLegacy/mac/ChangeLog
r267504 r267516 1 2020-09-23 Peng Liu <peng.liu6@apple.com> 2 3 Add feature flags for GPU Process features 4 https://bugs.webkit.org/show_bug.cgi?id=216901 5 6 Reviewed by Tim Horton. 7 8 Minor cleanups. 9 10 * WebView/WebPreferenceKeysPrivate.h: 11 * WebView/WebPreferences.mm: 12 (+[WebPreferences initialize]): 13 (-[WebPreferences useGPUProcessForMediaEnabled]): 14 (-[WebPreferences setUseGPUProcessForMediaEnabled:]): 15 (-[WebPreferences useGPUProcessForMedia]): Deleted. 16 (-[WebPreferences setUseGPUProcessForMedia:]): Deleted. 17 * WebView/WebPreferencesPrivate.h: 18 * WebView/WebView.mm: 19 (-[WebView _preferencesChanged:]): 20 1 21 2020-09-23 Chris Dumez <cdumez@apple.com> 2 22 -
trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
r267188 r267516 264 264 #define WebKitPictureInPictureAPIEnabledKey @"WebKitPictureInPictureAPIEnabled" 265 265 #define WebKitGenericCueAPIEnabledKey @"WebKitGenericCueAPIEnabled" 266 #define WebKitUseGPUProcessForMedia Key @"WebKitUseGPUProcessForMedia"266 #define WebKitUseGPUProcessForMediaEnabledKey @"WebKitUseGPUProcessForMediaEnabled" 267 267 #define WebKitAllowMediaContentTypesRequiringHardwareSupportAsFallbackKey @"WebKitAllowMediaContentTypesRequiringHardwareSupportAsFallback" 268 268 #define WebKitInspectorAdditionsEnabledPreferenceKey @"WebKitInspectorAdditionsEnabled" -
trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm
r267488 r267516 625 625 626 626 #if ENABLE(GPU_PROCESS) 627 @NO, WebKitUseGPUProcessForMedia Key,627 @NO, WebKitUseGPUProcessForMediaEnabledKey, 628 628 #endif 629 629 … … 3324 3324 } 3325 3325 3326 - (BOOL)useGPUProcessForMedia 3327 { 3328 return [self _boolValueForKey:WebKitUseGPUProcessForMedia Key];3329 } 3330 3331 - (void)setUseGPUProcessForMedia :(BOOL)flag3332 { 3333 [self _setBoolValue:flag forKey:WebKitUseGPUProcessForMedia Key];3326 - (BOOL)useGPUProcessForMediaEnabled 3327 { 3328 return [self _boolValueForKey:WebKitUseGPUProcessForMediaEnabledKey]; 3329 } 3330 3331 - (void)setUseGPUProcessForMediaEnabled:(BOOL)flag 3332 { 3333 [self _setBoolValue:flag forKey:WebKitUseGPUProcessForMediaEnabledKey]; 3334 3334 } 3335 3335 -
trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
r267222 r267516 648 648 @property (nonatomic) BOOL pictureInPictureAPIEnabled; 649 649 @property (nonatomic) BOOL genericCueAPIEnabled; 650 @property (nonatomic) BOOL useGPUProcessForMedia ;650 @property (nonatomic) BOOL useGPUProcessForMediaEnabled; 651 651 @property (nonatomic) BOOL viewportFitEnabled; 652 652 @property (nonatomic) BOOL constantPropertiesEnabled; -
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm
r267504 r267516 3400 3400 3401 3401 #if ENABLE(GPU_PROCESS) 3402 settings.setUseGPUProcessForMedia (preferences.useGPUProcessForMedia);3402 settings.setUseGPUProcessForMediaEnabled(preferences.useGPUProcessForMediaEnabled); 3403 3403 #endif 3404 3404
Note:
See TracChangeset
for help on using the changeset viewer.