Changeset 267079 in webkit
- Timestamp:
- Sep 15, 2020 12:13:51 AM (4 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r267069 r267079 1 2020-09-15 Youenn Fablet <youenn@apple.com> 2 3 Enable VP9 in GPUProcess if page needs it 4 https://bugs.webkit.org/show_bug.cgi?id=216472 5 6 Reviewed by Eric Carlson. 7 8 In case a page is using GPUProcess for media, send the VP9 parameters to GPUProcess. 9 GPUProcess will enable VP9 decoders based on that input. 10 Covered by LayoutTests/media/vp9.html with GPU process enabled. 11 12 * GPUProcess/GPUConnectionToWebProcess.cpp: 13 (WebKit::GPUConnectionToWebProcess::enableVP9Decoders): 14 * GPUProcess/GPUConnectionToWebProcess.h: 15 * GPUProcess/GPUConnectionToWebProcess.messages.in: 16 * GPUProcess/GPUProcess.cpp: 17 (WebKit::GPUProcess::enableVP9Decoders): 18 * GPUProcess/GPUProcess.h: 19 * WebProcess/GPU/GPUProcessConnection.cpp: 20 (WebKit::GPUProcessConnection::updateParameters): 21 * WebProcess/GPU/GPUProcessConnection.h: 22 * WebProcess/WebPage/WebPage.cpp: 23 (WebKit::m_limitsNavigationsToAppBoundDomains): 24 1 25 2020-09-14 Sam Weinig <weinig@apple.com> 2 26 -
trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp
r267021 r267079 514 514 #endif 515 515 516 #if ENABLE(VP9) 517 void GPUConnectionToWebProcess::enableVP9Decoders(bool shouldEnableVP9Decoder, bool shouldEnableVP9SWDecoder) 518 { 519 m_gpuProcess->enableVP9Decoders(shouldEnableVP9Decoder, shouldEnableVP9SWDecoder); 520 } 521 #endif 522 516 523 } // namespace WebKit 517 524 -
trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h
r267021 r267079 134 134 void setNowPlayingInfo(bool setAsNowPlayingApplication, WebCore::NowPlayingInfo&&); 135 135 136 #if ENABLE(VP9) 137 void enableVP9Decoders(bool shouldEnableVP9Decoder, bool shouldEnableVP9SWDecoder); 138 #endif 139 136 140 #if ENABLE(GPU_PROCESS) && USE(AUDIO_SESSION) 137 141 using EnsureAudioSessionCompletion = CompletionHandler<void(const RemoteAudioSessionConfiguration&)>; -
trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in
r258253 r267079 26 26 void CreateRenderingBackend(WebKit::RenderingBackendIdentifier renderingBackendIdentifier) 27 27 void ReleaseRenderingBackend(WebKit::RenderingBackendIdentifier renderingBackendIdentifier) 28 void ClearNowPlayingInfo() ;29 void SetNowPlayingInfo(bool setAsNowPlayingApplication, struct WebCore::NowPlayingInfo nowPlayingInfo) ;28 void ClearNowPlayingInfo() 29 void SetNowPlayingInfo(bool setAsNowPlayingApplication, struct WebCore::NowPlayingInfo nowPlayingInfo) 30 30 #if USE(AUDIO_SESSION) 31 31 EnsureAudioSession() -> (struct WebKit::RemoteAudioSessionConfiguration configuration) Synchronous … … 34 34 EnsureMediaSessionHelper() 35 35 #endif 36 #if ENABLE(VP9) 37 EnableVP9Decoders(bool shouldEnableVP9Decoder, bool shouldEnableVP9SWDecoder) 38 #endif 36 39 } 37 40 -
trunk/Source/WebKit/GPUProcess/GPUProcess.cpp
r267021 r267079 60 60 #endif 61 61 62 #if PLATFORM(COCOA) 63 #include <WebCore/VP9UtilitiesCocoa.h> 64 #endif 65 62 66 namespace WebKit { 63 67 using namespace WebCore; … … 267 271 #endif 268 272 273 #if ENABLE(VP9) 274 void GPUProcess::enableVP9Decoders(bool shouldEnableVP9Decoder, bool shouldEnableVP9SWDecoder) 275 { 276 if (shouldEnableVP9Decoder && !m_enableVP9Decoder) { 277 m_enableVP9Decoder = true; 278 #if PLATFORM(COCOA) 279 WebCore::registerSupplementalVP9Decoder(); 280 #endif 281 } 282 if (shouldEnableVP9SWDecoder && !m_enableVP9SWDecoder) { 283 m_enableVP9SWDecoder = true; 284 #if PLATFORM(COCOA) 285 WebCore::registerWebKitVP9Decoder(); 286 #endif 287 } 288 } 289 #endif 290 269 291 } // namespace WebKit 270 292 -
trunk/Source/WebKit/GPUProcess/GPUProcess.h
r267021 r267079 80 80 #endif 81 81 82 #if ENABLE(VP9) 83 void enableVP9Decoders(bool shouldEnableVP9Decoder, bool shouldEnableVP9SWDecoder); 84 #endif 85 82 86 private: 83 87 void lowMemoryHandler(Critical); … … 137 141 mutable std::unique_ptr<RemoteAudioSessionProxyManager> m_audioSessionManager; 138 142 #endif 143 #if ENABLE(VP9) 144 bool m_enableVP9Decoder { false }; 145 bool m_enableVP9SWDecoder { false }; 146 #endif 139 147 }; 140 148 -
trunk/Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp
r262695 r267079 42 42 #include "WebCoreArgumentCoders.h" 43 43 #include "WebPage.h" 44 #include "WebPageCreationParameters.h" 44 45 #include "WebPageMessages.h" 45 46 #include "WebProcess.h" … … 152 153 } 153 154 155 void GPUProcessConnection::updateParameters(const WebPageCreationParameters& parameters) 156 { 157 #if ENABLE(VP9) 158 if (m_enableVP9Decoder == parameters.shouldEnableVP9Decoder && m_enableVP9SWDecoder == parameters.shouldEnableVP9SWDecoder) 159 return; 160 161 m_enableVP9Decoder = parameters.shouldEnableVP9Decoder; 162 m_enableVP9SWDecoder = parameters.shouldEnableVP9SWDecoder; 163 connection().send(Messages::GPUConnectionToWebProcess::EnableVP9Decoders(parameters.shouldEnableVP9Decoder, parameters.shouldEnableVP9SWDecoder), { }); 164 #endif 165 } 166 154 167 } // namespace WebKit 155 168 -
trunk/Source/WebKit/WebProcess/GPU/GPUProcessConnection.h
r262695 r267079 44 44 class RemoteMediaPlayerManager; 45 45 class RemoteLegacyCDMFactory; 46 struct WebPageCreationParameters; 46 47 47 48 class GPUProcessConnection : public RefCounted<GPUProcessConnection>, IPC::Connection::Client { … … 74 75 #endif 75 76 77 void updateParameters(const WebPageCreationParameters&); 78 76 79 private: 77 80 GPUProcessConnection(IPC::Connection::Identifier); … … 98 101 std::unique_ptr<SampleBufferDisplayLayerManager> m_sampleBufferDisplayLayerManager; 99 102 #endif 103 #if ENABLE(VP9) 104 bool m_enableVP9Decoder { false }; 105 bool m_enableVP9SWDecoder { false }; 106 #endif 100 107 }; 101 108 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r266829 r267079 783 783 #endif 784 784 785 #if ENABLE(GPU_PROCESS) 786 if (m_page->settings().useGPUProcessForMedia()) 787 WebProcess::singleton().ensureGPUProcessConnection().updateParameters(parameters); 788 #endif 789 785 790 if (parameters.shouldEnableVP9Decoder) 786 791 WebProcess::singleton().enableVP9Decoder();
Note: See TracChangeset
for help on using the changeset viewer.