Fix a performance regression with shouldLoadFontEngineForCharacter.
authorPierre Rossi <pierre.rossi@nokia.com>
Wed, 7 Mar 2012 13:53:57 +0000 (14:53 +0100)
committerQt by Nokia <qt-info@nokia.com>
Thu, 8 Mar 2012 22:52:34 +0000 (23:52 +0100)
commit7e53debcf285426042f0f7283b28f716d3b728b1
tree7583629cdc4b5390c7d9c1bbdc9c843345aee6b2
parent4ba895a863a3468db2fe67beaa7e8b0b386b01dd
Fix a performance regression with shouldLoadFontEngineForCharacter.

Calling FcFontMatch should be avoided as much as possible. We can simply
cache the patterns it returns, which should still save memory compared to
loading all font engines as we did before.

Change-Id: I67208a4f919338a948535f717cfd0139dbea2e5f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig.cpp
src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h