Changeset 285410 in webkit
- Timestamp:
- Nov 8, 2021 9:57:56 AM (8 months ago)
- Location:
- trunk/Source
- Files:
-
- 9 edited
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/page/RuntimeEnabledFeatures.h (modified) (1 diff)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/GPUProcess/GPUProcess.cpp (modified) (1 diff)
-
WebKit/GPUProcess/GPUProcess.h (modified) (2 diffs)
-
WebKit/GPUProcess/GPUProcess.messages.in (modified) (1 diff)
-
WebKit/UIProcess/GPU/GPUProcessProxy.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r285407 r285410 1 2021-11-08 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Enabling "media source inline painting" by default should work when using GPU Process for media 4 https://bugs.webkit.org/show_bug.cgi?id=232802 5 6 Reviewed by Eric Carlson. 7 8 Clean up this experimental feature -- since it's backed by a global RuntimeEnabledFeature, we should: 9 1. Add `webcoreBinding: RuntimeEnabledFeatures`, and also: 10 2. Not be adding the corresponding page-scoped WebCore setting as well. 11 12 This adjustment makes it possible to enable this experimental feature when the GPU process is disabled, since 13 we now actually call into RuntimeEnabledFeatures to set the value (instead of just setting the WebCore setting 14 which wasn't consulted by anything). 15 16 * Scripts/Preferences/WebPreferencesExperimental.yaml: 17 1 18 2021-11-08 Yusuke Suzuki <ysuzuki@apple.com> 2 19 -
trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
r285260 r285410 890 890 humanReadableDescription: "Experimental MediaSource Inline Painting" 891 891 condition: ENABLE(MEDIA_SOURCE) && HAVE(AVSAMPLEBUFFERVIDEOOUTPUT) 892 defaultValue: 893 WebKitLegacy: 894 default: false 895 WebKit: 896 default: false 897 WebCore: 892 webcoreBinding: RuntimeEnabledFeatures 893 defaultValue: 894 WebKitLegacy: 895 default: false 896 WebKit: 898 897 default: false 899 898 -
trunk/Source/WebCore/ChangeLog
r285408 r285410 1 2021-11-08 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Enabling "media source inline painting" by default should work when using GPU Process for media 4 https://bugs.webkit.org/show_bug.cgi?id=232802 5 6 Reviewed by Eric Carlson. 7 8 See WebKit/ChangeLog for more details. 9 10 * page/RuntimeEnabledFeatures.h: 11 1 12 2021-11-08 Antti Koivisto <antti@apple.com> 2 13 -
trunk/Source/WebCore/page/RuntimeEnabledFeatures.h
r284976 r285410 253 253 254 254 #if ENABLE(MEDIA_SOURCE) && HAVE(AVSAMPLEBUFFERVIDEOOUTPUT) 255 void setMediaSourceInlinePaintingEnabled(bool);255 WEBCORE_EXPORT void setMediaSourceInlinePaintingEnabled(bool); 256 256 bool mediaSourceInlinePaintingEnabled() const { return m_mediaSourceInlinePaintingEnabled; } 257 257 #endif -
trunk/Source/WebKit/ChangeLog
r285404 r285410 1 2021-11-08 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Enabling "media source inline painting" by default should work when using GPU Process for media 4 https://bugs.webkit.org/show_bug.cgi?id=232802 5 6 Reviewed by Eric Carlson. 7 8 Propagate the bit for `MediaSourceInlinePaintingEnabled` over to the GPU process when updating preferences in 9 GPUProcessProxy. 10 11 * GPUProcess/GPUProcess.cpp: 12 (WebKit::GPUProcess::setMediaSourceInlinePaintingEnabled): 13 * GPUProcess/GPUProcess.h: 14 * GPUProcess/GPUProcess.messages.in: 15 * UIProcess/GPU/GPUProcessProxy.cpp: 16 (WebKit::GPUProcessProxy::updatePreferences): 17 18 Also, add a couple of FIXMEs here. Note that due to the latter FIXME, this change *still* doesn't allow us to 19 turn on media source inline painting when using GPU process for media by simply toggling the feature in user 20 defaults or through UI. This is because preferences on WebPageGroups are not modified when changing experimental 21 feature user defaults, so logic that iterates through all page groups and looks at preferences will still only 22 get the default value of each feature flag (as defined in the yaml file). 23 1 24 2021-11-08 Kate Cheney <katherine_cheney@apple.com> 2 25 -
trunk/Source/WebKit/GPUProcess/GPUProcess.cpp
r285195 r285410 498 498 #endif 499 499 500 #if ENABLE(MEDIA_SOURCE) && HAVE(AVSAMPLEBUFFERVIDEOOUTPUT) 501 void GPUProcess::setMediaSourceInlinePaintingEnabled(bool enabled) 502 { 503 if (m_mediaSourceInlinePaintingEnabled == enabled) 504 return; 505 m_mediaSourceInlinePaintingEnabled = enabled; 506 WebCore::RuntimeEnabledFeatures::sharedFeatures().setMediaSourceInlinePaintingEnabled(m_mediaSourceInlinePaintingEnabled); 507 } 508 #endif 509 500 510 void GPUProcess::webProcessConnectionCountForTesting(CompletionHandler<void(uint64_t)>&& completionHandler) 501 511 { -
trunk/Source/WebKit/GPUProcess/GPUProcess.h
r285219 r285410 172 172 #endif 173 173 174 #if ENABLE(MEDIA_SOURCE) && HAVE(AVSAMPLEBUFFERVIDEOOUTPUT) 175 void setMediaSourceInlinePaintingEnabled(bool); 176 #endif 177 174 178 #if ENABLE(CFPREFS_DIRECT_MODE) 175 179 void notifyPreferencesChanged(const String& domain, const String& key, const std::optional<String>& encodedValue); … … 230 234 bool m_vorbisEnabled { false }; 231 235 #endif 236 #if ENABLE(MEDIA_SOURCE) && HAVE(AVSAMPLEBUFFERVIDEOOUTPUT) 237 bool m_mediaSourceInlinePaintingEnabled { false }; 238 #endif 232 239 String m_applicationVisibleName; 233 240 }; -
trunk/Source/WebKit/GPUProcess/GPUProcess.messages.in
r285219 r285410 69 69 #endif 70 70 71 #if ENABLE(MEDIA_SOURCE) && HAVE(AVSAMPLEBUFFERVIDEOOUTPUT) 72 SetMediaSourceInlinePaintingEnabled(bool enabled); 73 #endif 74 71 75 #if ENABLE(CFPREFS_DIRECT_MODE) 72 76 NotifyPreferencesChanged(String domain, String key, std::optional<String> encodedValue) -
trunk/Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp
r285219 r285410 603 603 #endif 604 604 605 #if ENABLE(MEDIA_SOURCE) && HAVE(AVSAMPLEBUFFERVIDEOOUTPUT) 606 bool hasEnabledMediaSourceInlinePainting = false; 607 #endif 608 609 // FIXME: We should consider consolidating these into a single struct and propagating it to the GPU process as a single IPC message, 610 // instead of sending one message for each preference. 611 // 612 // FIXME: Additionally, it seems wrong to consult preferences on WebPageGroup rather than WebPreferences corresponding to each page. 613 // This effectively means that each of the below preferences will always be set to the default value and cannot be toggled through the 614 // develop menu or user defaults, since the defaults for each group are prefixed with a unique identifier. 615 // 616 // Since each of these features apply to the entire GPU process at once (i.e. they affect all web pages using the GPU process), we 617 // could instead refactor this so that we iterate through all web pages' preferences when initializing the GPU process for the first 618 // time, and then update these flags when creating new web pages. 605 619 WebPageGroup::forEach([&] (auto& group) mutable { 606 620 if (!group.preferences().useGPUProcessForMediaEnabled()) … … 626 640 hasEnabledWebMParser = true; 627 641 #endif 642 643 #if ENABLE(MEDIA_SOURCE) && HAVE(AVSAMPLEBUFFERVIDEOOUTPUT) 644 if (group.preferences().mediaSourceInlinePaintingEnabled()) 645 hasEnabledMediaSourceInlinePainting = true; 646 #endif 628 647 }); 629 648 … … 642 661 #if ENABLE(VORBIS) 643 662 send(Messages::GPUProcess::SetVorbisDecoderEnabled(hasEnabledVorbis), 0); 663 #endif 664 665 #if ENABLE(MEDIA_SOURCE) && HAVE(AVSAMPLEBUFFERVIDEOOUTPUT) 666 send(Messages::GPUProcess::SetMediaSourceInlinePaintingEnabled(hasEnabledMediaSourceInlinePainting), 0); 644 667 #endif 645 668
Note: See TracChangeset
for help on using the changeset viewer.