aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-09-25 20:00:31 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-25 20:00:41 +0000
commitf40ae1a4b5365620463bd63b5140bd3fc78894a1 (patch)
tree3070160f98d80ea9e2ab53eb8b06035d70582701 /gm
parenta3ab53b93a40185d7f29409264f91b835ae8929e (diff)
Revert "migrate to sk_sp for SkFontMgr API"
This reverts commit 4bf296be2821d2bdd0afabae9fdfe18e7e9b59cb. Reason for revert: need guard for flutter Original change's description: > migrate to sk_sp for SkFontMgr API > > Bug: skia: > Change-Id: I1bf2a13537f67938cdc9956080065d10ea0bd1d8 > Reviewed-on: https://skia-review.googlesource.com/48740 > Commit-Queue: Ben Wagner <bungeman@google.com> > Reviewed-by: Ben Wagner <bungeman@google.com> TBR=bungeman@google.com,reed@google.com Change-Id: Ib0b2d00fcbcdb6131444f94d1046df6dae24f551 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/50940 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'gm')
-rw-r--r--gm/fontmgr.cpp3
-rw-r--r--gm/fontscalerdistortable.cpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/gm/fontmgr.cpp b/gm/fontmgr.cpp
index 9708d19978..8d14e3a66d 100644
--- a/gm/fontmgr.cpp
+++ b/gm/fontmgr.cpp
@@ -46,7 +46,8 @@ static SkScalar drawCharacter(SkCanvas* canvas, uint32_t character, SkScalar x,
// it expects to get the same glyph when following this pattern.
SkString familyName;
typeface->getFamilyName(&familyName);
- paint.setTypeface(fm->legacyMakeTypeface(familyName.c_str(), typeface->fontStyle()));
+ paint.setTypeface(sk_sp<SkTypeface>(fm->legacyCreateTypeface(familyName.c_str(),
+ typeface->fontStyle())));
return drawString(canvas, ch, x, y, paint) + 20;
}
diff --git a/gm/fontscalerdistortable.cpp b/gm/fontscalerdistortable.cpp
index 64bb9bc44d..e3fb99c879 100644
--- a/gm/fontscalerdistortable.cpp
+++ b/gm/fontscalerdistortable.cpp
@@ -52,8 +52,8 @@ protected:
SkFontArguments::VariationPosition::Coordinate coordinates[] = {{tag, styleValue}};
SkFontArguments::VariationPosition position =
{ coordinates, SK_ARRAY_COUNT(coordinates) };
- paint.setTypeface(sk_sp<SkTypeface>(fontMgr->makeFromStream(
- distortable->duplicate(),
+ paint.setTypeface(sk_sp<SkTypeface>(fontMgr->createFromStream(
+ distortable->duplicate().release(),
SkFontArguments().setVariationDesignPosition(position))));
SkAutoCanvasRestore acr(canvas, true);