Bug 198783 - [WinCairo][MediaFoundation] Stop using soft linking for Media Foundation
Summary: [WinCairo][MediaFoundation] Stop using soft linking for Media Foundation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-11 22:20 PDT by Fujii Hironori
Modified: 2019-06-27 20:08 PDT (History)
7 users (show)

See Also:


Attachments
WinCairo WK1 MiniBrowser start up log (10.17 KB, text/plain)
2019-06-13 19:08 PDT, Fujii Hironori
no flags Details
Patch (13.88 KB, patch)
2019-06-25 22:45 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews211 for win-future (14.04 MB, application/zip)
2019-06-26 05:12 PDT, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2019-06-11 22:20:04 PDT
[WinCairo][MediaFoundation] Stop using soft linking for Media Foundation

WinCairo is supporting Windows 7 or newer. It doen't need soft linking anymore.

Bug 141905 – [WinCairo] WinLauncher is not starting on Vista.
Bug 144890 – [Win] Move Windows build target to Windows 7 (or newer)
Comment 1 Per Arne Vollan 2019-06-12 07:18:33 PDT
Isn't soft linking also a performance improvement, since you only load the dll's when you need to?
Comment 2 Fujii Hironori 2019-06-12 20:56:25 PDT
I checked Firefox and Chrome by using listdlls.
It seems that firefox.exe and chrome.exe loaded Direct3D, dxva2.dll, mf.dll and mfplat.dll just by start up the browsers.

I'd like to change the call site of MFStartup and MFShutdown to fix Bug 198281.
Then, mfplat.dll will be loaded always.
Comment 3 Fujii Hironori 2019-06-12 21:37:09 PDT
Firefox is using soft linking.
https://dxr.mozilla.org/mozilla-central/source/dom/media/platforms/wmf/WMFUtils.cpp

Chromium is calling API directly, for example MFStartup and MFCreateMediaType.
You can search them by https://cs.chromium.org/
Comment 4 Fujii Hironori 2019-06-12 21:45:10 PDT
Chromium is using /DELAYLOAD.

>     ldflags += [
> 	      "/DELAYLOAD:d3d9.dll",
> 	      "/DELAYLOAD:d3d11.dll",
> 	      "/DELAYLOAD:dxva2.dll",
> 	      "/DELAYLOAD:mf.dll",
> 	      "/DELAYLOAD:mfplat.dll",
> 	      ]

https://chromium.googlesource.com/chromium/src/+/HEAD/media/gpu/BUILD.gn#213
Comment 5 Fujii Hironori 2019-06-13 19:08:26 PDT
Created attachment 372096 [details]
WinCairo WK1 MiniBrowser start up log

WinCairo MiniBrowser.exe also loads mf.dll just by stating up.
Comment 6 Fujii Hironori 2019-06-25 22:45:49 PDT
Created attachment 372906 [details]
Patch
Comment 7 EWS Watchlist 2019-06-26 05:12:20 PDT
Comment on attachment 372906 [details]
Patch

Attachment 372906 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/12579200

New failing tests:
storage/indexeddb/index-cursor.html
Comment 8 EWS Watchlist 2019-06-26 05:12:24 PDT
Created attachment 372917 [details]
Archive of layout-test-results from ews211 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews211  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 9 Fujii Hironori 2019-06-27 19:10:36 PDT
Comment on attachment 372906 [details]
Patch

Clearing flags on attachment: 372906

Committed r246918: <https://trac.webkit.org/changeset/246918>
Comment 10 Fujii Hironori 2019-06-27 19:10:40 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2019-06-27 19:20:08 PDT
<rdar://problem/52301843>
Comment 12 Fujii Hironori 2019-06-27 20:08:52 PDT
Committed r246919: <https://trac.webkit.org/changeset/246919>