aboutsummaryrefslogtreecommitdiff
path: root/tests/SerialProcsTest.cpp
diff options
context:
space:
mode:
authorNolan Scobie <nscobie@google.com>2023-11-07 20:40:19 +0000
committerSkCQ <skcq-be@skia-corp.google.com.iam.gserviceaccount.com>2023-11-07 20:44:10 +0000
commit09311101b293b69c38395ecdaf93ced73a0e1256 (patch)
tree07353cb3ad47bb1066cf7e8fc452a9cf1eb114a1 /tests/SerialProcsTest.cpp
parentee0a395f917b093f3cd691d1d176429ca7693083 (diff)
downloadskia-09311101b293b69c38395ecdaf93ced73a0e1256.tar.gz
Revert "Migrate many direct and indirect uses of SkFontMgr to use TestFontMgr"
This reverts commit 3258c98d2edf072073d0e98d79d59e3458b77089. Reason for revert: causing linking failures in Android roller, possibly also causing issues with cpu_8888_benchmark_android_test 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 <kjlubick@google.com> > Reviewed-by: Ben Wagner <bungeman@google.com> Bug: b/305780908 Change-Id: I46a7482bb4654f732aaa9e2c8a6f60a77b9ddd8d No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/c/skia/+/775516 Commit-Queue: Robert Phillips <robertphillips@google.com> Auto-Submit: Nolan Scobie <nscobie@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/SerialProcsTest.cpp')
-rw-r--r--tests/SerialProcsTest.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/SerialProcsTest.cpp b/tests/SerialProcsTest.cpp
index b8c2646093..23564e7d0b 100644
--- a/tests/SerialProcsTest.cpp
+++ b/tests/SerialProcsTest.cpp
@@ -29,7 +29,6 @@
#include "tools/DecodeUtils.h"
#include "tools/Resources.h"
#include "tools/ToolUtils.h"
-#include "tools/fonts/FontToolUtils.h"
#include <algorithm>
#include <cstring>
@@ -212,8 +211,8 @@ static sk_sp<SkPicture> make_picture(const sk_sp<SkTypeface>& tf0, const sk_sp<S
}
DEF_TEST(serial_typeface, reporter) {
- auto tf0 = ToolUtils::CreateTypefaceFromResource("fonts/hintgasp.ttf");
- auto tf1 = ToolUtils::CreateTypefaceFromResource("fonts/Roboto2-Regular_NoEmbed.ttf");
+ auto tf0 = MakeResourceAsTypeface("fonts/hintgasp.ttf");
+ auto tf1 = MakeResourceAsTypeface("fonts/Roboto2-Regular_NoEmbed.ttf");
if (!tf0 || !tf1 || tf0.get() == tf1.get()) {
return; // need two different typefaces for this test to make sense.
}