aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/FontMgrTest.cpp3
-rw-r--r--tests/TypefaceTest.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/FontMgrTest.cpp b/tests/FontMgrTest.cpp
index 17a60bbd79..4abbd19fb9 100644
--- a/tests/FontMgrTest.cpp
+++ b/tests/FontMgrTest.cpp
@@ -128,6 +128,9 @@ static void test_matchStyleCSS3(skiatest::Reporter* reporter) {
TestTypeface(const SkFontStyle& fontStyle) : SkTypeface(fontStyle, false){}
protected:
SkStreamAsset* onOpenStream(int* ttcIndex) const override { return nullptr; }
+ sk_sp<SkTypeface> onMakeClone(const SkFontArguments& args) const override {
+ return sk_ref_sp(this);
+ }
SkScalerContext* onCreateScalerContext(const SkScalerContextEffects&,
const SkDescriptor*) const override {
return nullptr;
diff --git a/tests/TypefaceTest.cpp b/tests/TypefaceTest.cpp
index f0253ef08f..757f3a5e44 100644
--- a/tests/TypefaceTest.cpp
+++ b/tests/TypefaceTest.cpp
@@ -235,6 +235,9 @@ protected:
EmptyTypeface() : SkTypeface(SkFontStyle(), true) { }
SkStreamAsset* onOpenStream(int* ttcIndex) const override { return nullptr; }
+ sk_sp<SkTypeface> onMakeClone(const SkFontArguments& args) const override {
+ return sk_ref_sp(this);
+ }
SkScalerContext* onCreateScalerContext(const SkScalerContextEffects&,
const SkDescriptor*) const override {
return nullptr;