Cache QTextLayout objects with Qt/Mac

It seems that the internal Qt5 caching does not work well here,
especially in the case of ancient Hebrew documents.

(cherry picked from commit 5354c64b27)
This commit is contained in:
Jean-Marc Lasgouttes 2017-04-18 14:02:31 +02:00
parent 413de12adf
commit 04350ad288
2 changed files with 6 additions and 2 deletions

View File

@ -58,7 +58,8 @@ namespace frontend {
int cache_metrics_width_size = 1 << 19;
int cache_metrics_breakat_size = 1 << 19;
// Qt 5.x already has its own caching of QTextLayout objects
#if (QT_VERSION < 0x050000)
// but it does not seem to work well on MacOS X.
#if (QT_VERSION < 0x050000) || defined(Q_OS_MAC)
int cache_metrics_qtextlayout_size = 500;
#else
int cache_metrics_qtextlayout_size = 0;

View File

@ -55,7 +55,10 @@ What's new
- fixes to cursor positionning on mouse click for right-to-left text
(bug 10569).
- Fix metricsof full-width insets when paragraph endings are shown (bug #10537).
- Fix metrics of full-width insets when paragraph endings are shown
(bug #10537).
- Fix glacial performance with ancient Hebrew text on macOS.
* INTERNALS