Jean-Marc Lasgouttes 6bbd88accf Improve (modestly) the performance of font metrics caches
This fixes two performance issues and improves the performance of
TextMetrics::redoParagraph by 15% in a workload that uses the cache a
lot. The difference will be much less when the cache is not used much.

1/ repetion of the hash code computation

The code
  if (cache.contains(key))
  	result = cache[key]:
is not efficient, since qHash(key) has to be computed twice.
To fix this a new Cache::object_str() method is added, which allows
  if (auto * obj = cache.object(key))
  	result = *obj;

2/ code of has code computation

Instead of using a verbose string that is complicated to build as
key, new key structs BreakAtKey and TextLayoutKey are introduced,
along with the relevant qHash() implementation.
2021-09-24 17:12:15 +02:00
..
2020-11-21 19:54:43 +01:00
2020-04-30 23:09:36 -04:00
2020-11-01 22:23:26 +02:00
2020-11-01 22:23:26 +02:00
2020-10-05 14:55:00 +02:00
2020-10-05 09:37:15 +02:00
2021-01-26 08:42:39 +01:00
2020-02-29 00:06:35 -05:00
2020-11-21 00:32:47 +02:00
2020-11-21 00:32:47 +02:00
2021-01-10 01:54:40 -05:00
2021-01-10 01:54:40 -05:00
2020-11-21 20:32:16 +02:00
2020-11-25 02:43:16 +02:00
2021-01-31 15:21:23 +01:00
2020-01-27 15:34:27 +01:00
2020-06-25 23:17:18 +02:00
2021-03-15 17:09:09 +01:00
2020-11-29 15:27:28 +02:00
2021-03-26 13:11:44 +01:00
2020-06-25 23:17:18 +02:00
2020-12-19 22:52:57 +02:00
2020-02-29 00:06:35 -05:00
2020-06-25 23:17:18 +02:00
2019-04-27 12:53:05 +02:00