Willing to share XP patches for Chrome 76

Any topic
Post Reply
DoaJC_Blogger
Posts: 15
Joined: Sun Dec 30, 2018 2:30 pm

Willing to share XP patches for Chrome 76

Post by DoaJC_Blogger » Tue Nov 26, 2019 2:23 pm

I started with Chromium 76 and fixed a long list of errors on Windows XP before reaching the point where I have to replace DirectWrite with GDI. I tried several times without success. A few people have expressed interest in the code for my Chromium project but I declined to share it. I'm willing to share it now with someone who can help because I think it's more important to keep the project going. Here is a notice I posted on Skype and Discord:

I'm willing to cross-license my work with anyone who can enable GDI font rendering. That means I'll give credit to whoever helps me, and they will be required to give credit to me if they release their own browser using my XP patches. Both of us can make our work open- or closed-source as long as we give credit to the other party.

Here is the list of errors I resolved.

GetThreadId
EnumSystemLocalesEx
GetFileInformationByHandleEx
GetUserDefaultLocaleName
InitOnceExecuteOnce
K32GetPerformanceInfo
K32GetProcessMemoryInfo
K32QueryWorkingSet
SHGetKnownFolderPath
EventRegister
SetProcessDPIAware
GetDateFormatEx
GetDynamicTimeZoneInformation
GetLocaleInfoEx
InitializeConditionVariable
K32EmptyWorkingSet
K32EnumProcessModules
K32GetMappedFileNameW
K32GetModuleFileNameExW
K32GetModuleInformation
LCIDToLocaleName
LocaleNameToLCID
PowerClearRequest
PowerCreateRequest
PowerSetRequest
RaiseFailFastException
CloseTouchInputHandle
DisplayConfigGetDeviceInfo
GetDisplayConfigBufferSizes
RegsterPowerSettingNotification
RegisterTouchWindow
UnregisterPowerSettingNotification
SHCreateItemFromParsingName
SHGetPropertyStoreForWindow
SHOpenWithDialog
SHQueryUserNotificationState
UIAutomationCore.dll (fixed by installing the .Net Framework)
PROPSYS.dll (fixed by installing Windows Search)
DWrite.dll (in progress)

admin
Site Admin
Posts: 235
Joined: Wed Feb 06, 2013 7:47 pm

Re: Willing to share XP patches for Chrome 76

Post by admin » Wed Nov 27, 2019 12:20 pm

It's weird you are having problems with DirectWrite because most rendering is made using skia and it is supposed to work fine on XP, I believe there is something else holding you back, I believe the hardest part to make it work under XP is SSL, all the stuff they added for sandboxing and NaCl.

What error you are currently getting?

DoaJC_Blogger
Posts: 15
Joined: Sun Dec 30, 2018 2:30 pm

Re: Willing to share XP patches for Chrome 76

Post by DoaJC_Blogger » Wed Nov 27, 2019 5:38 pm

It says it's missing DWrite.dll. FranceBB (from another forum) opened my build in Dependency Walker. Here are the screenshots he posted.

https://i.imgur.com/oDFLJpb.png
https://i.imgur.com/v6AXH8M.png
https://i.imgur.com/olQGFiM.png

admin
Site Admin
Posts: 235
Joined: Wed Feb 06, 2013 7:47 pm

Re: Willing to share XP patches for Chrome 76

Post by admin » Wed Nov 27, 2019 11:14 pm

They removed GDI support around april 2016, here is the info:

https://chromium.googlesource.com/chrom ... 310e5c2ec8

Try reverting that commit, I used to revert that specific commit to reenable GDI, since they move the code a lot it won't be easy now.

admin
Site Admin
Posts: 235
Joined: Wed Feb 06, 2013 7:47 pm

Re: Willing to share XP patches for Chrome 76

Post by admin » Thu Nov 28, 2019 12:35 am

Tracking everything back is hard because they removed a lot of files, doing all in reverse you end here:

https://cs.chromium.org/search/?q=dwrit ... um&type=cs

that goes to:
/src/third_party/skia/src/utils/win/SkDWrite.cpp

and the error you are getting is exactly there:

static void create_dwrite_factory(IDWriteFactory** factory) {
typedef decltype(DWriteCreateFactory)* DWriteCreateFactoryProc;
DWriteCreateFactoryProc dWriteCreateFactoryProc = reinterpret_cast<DWriteCreateFactoryProc>(
GetProcAddress(LoadLibraryW(L"dwrite.dll"), "DWriteCreateFactory"));

Now, SKIA is supposed to still support GDI, so the problem is the font cache inside blink, that sends us to:

\chromium\src\third_party\blink\renderer\platform\fonts\win\font_cache_skia_win.cc

that path is every different now, it's going to be hard to switch to GDI, thats as far as I can go :(

Post Reply