Bug 112486 (DirectWrite-Regression) - [META] Bugs caused/worsened by more use of DirectWrite
Summary: [META] Bugs caused/worsened by more use of DirectWrite
Status: NEW
Alias: DirectWrite-Regression
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.3.3.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.3.7 target:6.0.0 target:5.4.3
Keywords:
Depends on: 105863 106990 107090 107166 107355 107944 108236 108361 108535 108574 109174 109220 110794 111084 112305 112492 113090 113482 113933 116630 118487 118762
Blocks: DirectWrite
  Show dependency treegraph
 
Reported: 2017-09-19 06:42 UTC by Telesto
Modified: 2022-08-22 22:55 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
LO 537dev with GDI patch vs current master (46.90 KB, image/png)
2017-10-03 17:15 UTC, V Stuart Foote
Details
comparison of Help menu (53.79 KB, image/png)
2017-10-03 17:42 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2017-09-19 06:42:56 UTC
Description:
A metabug for all issues caused or worsened by:

commit 19490574e42c3180a38d55ccbbf1e3a00802150d
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Tue Mar 7 03:23:53 2017 -0800

    source a51b7a1c3a7e7cf7b0c733e1dec40288278c1884
	
	author	Khaled Hosny <khaledhosny@eglug.org>	2017-03-03 03:15:14 (GMT)
committer	Khaled Hosny <khaledhosny@eglug.org>	2017-03-03 13:22:53 (GMT)
commit a51b7a1c3a7e7cf7b0c733e1dec40288278c1884 (patch)
tree 6452088195b6c0ad617e7a6b9f97ecc8672d321e
parent 5742868ccf030b2c0f03538d030bd18bd5666bdb (diff)
tdf#103831, tdf#100986: Force using GDI when needed

Actual Results:  
 

Expected Results:
 


Reproducible: Always

User Profile Reset: No

Additional Info:
 


User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Telesto 2017-09-19 07:17:17 UTC
A list of bugs caused or introduced by force using GDI when needed. There probably more of bugs. For example bug 108574 (slow scrolling)
Comment 2 Telesto 2017-09-20 07:01:10 UTC
Only thinking.. All issues here are probably caused/worsened by the commit of Khaled. Is it possible to limit the scope of the commit to OpenGL cases only? tdf#103831 and tdf#100986 are both OpenGL issues... And restore the GDI+ rendering rather than DirectWrite for the rest, at least for the moment.
Comment 3 bugzilla2 2017-09-25 13:13:44 UTC Comment hidden (me-too)
Comment 4 bugzilla2 2017-09-25 13:16:38 UTC
Possibly another Bug(report) caused by the Render-Change:
Bug 112231 - Slow GUI (edit)
Comment 5 Aron Budea 2017-09-25 17:54:44 UTC
Let's point to Khaled's analysis (thanks for that):
"Hmm, I don’t think you need to revert the whole change. Looking into
this again, I think there are two unrelated changes in this commit;
forcing GDI for non-horizontal text which fixed the two bugs, and
optionally not using GDI when not using OpenGL (previously we always
used GDI when OpenGL was used). I think it was wishful thinking of my
part to think the non-GDI code path is usable.

In short, I guess you just need to change the !bUseOpenGL branch back to:

        DrawTextLayout(rLayout, hDC, false);

This should fix the newly introduced issues. I can’t test this myself
right now, though, and might not be able to do so for few more weeks.
It might also cause a regression for some Graphite fonts, but I
don’t remember the details, but it shouldn’t be hard to have a
CommonSalLayout::isGraphite() or so to signal such fonts and not use
GDI for them."
http://nabble.documentfoundation.org/Re-Minutes-of-ESC-call-2017-09-21-tt4223238.html#a4223433
Comment 6 Commit Notification 2017-09-28 14:10:07 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5440837e02dee8bc884e02be697bfd4def621d26&h=libreoffice-5-3

tdf#112486 Do not force GDI in no OpenGL

It will be available in 5.3.7.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 V Stuart Foote 2017-10-03 17:15:02 UTC
Created attachment 136739 [details]
LO 537dev with GDI patch vs current master

Clip shows the restored default font rendering of the main menu and listbox with the noOpenGL use GDI patch to winlayout.cxx for 5.3.7

5.3.7 top, recent master bottom.

Testing Windows 10 Ent 64-bit en-US with nVidia K2000 GPU (driver 21.21.13.7755)

Version: 5.3.7.0.0+ (x64)
Build ID: 149f28e9a5d66db18ffb36547b2ba394c303fc4d
CPU Threads: 8; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
TinderBox: Win-x86_64@62-TDF, Branch:libreoffice-5-3, Time: 2017-09-30_08:04:07
Locale: en-US (en_US); Calc: CL

Version: 6.0.0.0.alpha0+ (x64)
Build ID: 465092047d5fa6ec6dd369372e712d76554570ff
CPU threads: 8; OS: Windows 6.19; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-09-26_23:16:01
Locale: en-US (en_US); Calc: CL
Comment 8 V Stuart Foote 2017-10-03 17:42:08 UTC
Created attachment 136740 [details]
comparison of Help menu

Same system, Help menu from LO537dev with patch compared to same from recent master. Note the cleaner font rendering/anti-alaising for O, D, G, C.

So guess this salvages the final 5.3 release, but DirectWrite Direct2D rendering still needs work for 5.4 and 6.0
Comment 9 Commit Notification 2017-10-03 23:39:33 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=01f674a95ddec76dc4c8ecfccdca1773657e47cb

tdf#112486 Do not force GDI in no OpenGL

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Timur 2017-10-04 07:42:46 UTC
Is this one temporary bug "fixed" now? Is permanent issue in Bug 107521?
Comment 11 Aron Budea 2017-10-04 11:52:44 UTC
As an idea, the DW enablement could be tied to an environment variable, since the plan is still to move in the direction of DW and away from GDI, AFAIK.
Thus the dependent bug reports that occur with DW enabled should also be kept open IMO.
Comment 12 Commit Notification 2017-10-04 15:02:20 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2ed67ed55ad929eb9363a5c4e3c55b3ee857d984&h=libreoffice-5-4

tdf#112486 Do not force GDI in no OpenGL

It will be available in 5.4.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 bugzilla2 2017-10-20 08:40:29 UTC
Just tested 5.3.7 RC1 and the issue is resolved :)

BUT!!! HW-Acceleration is disabled by default! OpenGL ist enabled by default :(

Since OpenGL is so extremely slow and ugly, please make HW-Acceleration the default again in 5.3.7 RC2 and all other future builds.
Comment 14 Telesto 2017-11-03 11:23:36 UTC
Bug 113347 may solve some problems encountered here. For example bug 108535, bug 109174, bug 108361