commit | 88ddcb8f500d1a4f26d07076f426a20b62308f3d | [log] [tgz] |
---|---|---|
author | Ben Wagner <bungeman@google.com> | Mon Feb 07 16:14:04 2022 +0000 |
committer | SkCQ <skcq-be@skia-corp.google.com.iam.gserviceaccount.com> | Mon Feb 07 21:32:21 2022 +0000 |
tree | 4f3d0a800aa3cd6a45991b64d7875a954afdfc15 | |
parent | f85d177016cb83cba454b192766655f74f44f9bd [diff] |
Reland "Pin FcConfig for FCIDirect at creation." This reverts commit d7f7cc87910800232c5900ebb64c0c00781cd0c2. SkFontConfigInterfaceDirect class methods used the FontConfig library static global "current" FcConfig (implicitly through the use of nullptr). This was pinned down once per call to each method which used it (to avoid the "current" FcConfig from being changed out from under it while running). However, the use of global state as a matter of course makes it very difficult to reliably test. Modify SkFontConfigInterface to optionally take an FcConfig on contruction. If nullptr is provided it is equivelent to the old behavior so that existing users are unaffected. SkFontConfigInterface takes ownership of any passed FcConfig and will release it on destruction. Bug: skia:12916 Change-Id: I20a3cd9405ad40f28b394c713c0514aaa3b08cd0 Revert-Reviewed-on: https://skia-review.googlesource.com/c/skia/+/504776 Revert-Change-Id: I812547bf27371ab716b7a167d7e975f7538d37fb Revert-Reason: google3 roll failure due to memory leak Original-Reviewed-on: https://skia-review.googlesource.com/c/skia/+/504477 Origianl-Change-Id: Ie3573403a95c6bf627ce5ff7f2eb5617c9cd162d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505136 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>