mirrored from https://skia.googlesource.com/skia
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reland "Reland "Migrate many direct and indirect uses of SkFontMgr to…
… use TestFontMgr"" This is a reland of commit bea8af8 This adds in the custom directory SkFontMgr to FontToolUtils.cpp, which is important for our ChromeOS tests. Also, our sanitizers don't always build with fontconfig support, so there need to be some fallbacks to appease the compilation step, even though we don't run all the binaries with the sanitizers (e.g. create_test_font) Original change's description: > Reland "Migrate many direct and indirect uses of SkFontMgr to use TestFontMgr" > > This is a reland of commit 3258c98 > > It introduces SK_FONTMGR_*_AVAILABLE defines, such that FonToolUtils.cpp > (and our clients) can detect at compile time what GN or Bazel depends > on (by exporting those defines when depended upon). This avoids us > having to make opinionated decisions based on the target platform > (which was causing issues with ChromeOS and Android Framework). > > Original change's description: > > Migrate many direct and indirect uses of SkFontMgr to use TestFontMgr > > > > This removes most direct (e.g. SkFontMgr::RefDefault) or indirect > > (e.g. SkTypeface::MakeFromData) uses of the default SkFontMgr in Skia. > > > > There are a few other cases that impact public APIs or could impact > > current clients, which will be handled separately (e.g. Skottie) > > > > Suggested Reading Order: > > - tools/fonts/FontToolUtils.cpp to see that this absorbed > > tools/flags/CommonFlagsFontMgr.cpp and the two flags which > > controlled FontMgrs. Notice this no longer needs an initialization > > call, because the first call to ToolUtils::TestFontMgr() will > > lazily read and apply these flags. > > - tools/fiddle/* to see a new fontMgr global variable is made > > available, which is *always* the FontConfig one, due to the > > fact that fiddle only runs on Linux (and there are no plans > > to change that). > > - Remaining deleted files - these had bitrotting code related to > > fonts that was identified via grep and deemed not worth fixing > > since it is not being compiled anyway. > > - fuzz/ to see many of these now have a convenient function to > > call to explicitly set up the portable fontmgr. With this > > and the addition of ToolUtils::FontMgrIsGDI(), src/core/SkFontMgrPriv.h > > is no longer used (outside of the #define guarded, deprecated > > FontMgr Factory functions). > > - Other files in any order - these remaining changes were pretty > > mechanical. > > > > See also: > > - http://review.skia.org/772660 > > - http://review.skia.org/772903 > > > > Bug: b/305780908 > > Change-Id: I46a43750ebfd9f9dbe743931cb99a5fe70a0dc0c > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/772659 > > Commit-Queue: Kevin Lubick <[email protected]> > > Reviewed-by: Ben Wagner <[email protected]> > > Bug: b/305780908 > Change-Id: I361ddaa56250f76a66104ddf8a8b29942d13838b > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/775996 > Reviewed-by: Ben Wagner <[email protected]> Bug: b/305780908 Change-Id: I88bce4d9434874f3cc9674f9f019e39c04594927 Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian10-Clang-x86_64-Release-MSAN Reviewed-on: https://skia-review.googlesource.com/c/skia/+/777536 Reviewed-by: Ben Wagner <[email protected]> Commit-Queue: Kevin Lubick <[email protected]>
- Loading branch information
Showing
111 changed files
with
662 additions
and
524 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.