aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-09-25 13:21:45 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-25 19:45:09 +0000
commit4bf296be2821d2bdd0afabae9fdfe18e7e9b59cb (patch)
treeada1341d6943d4e8b91b5d9da331ac82873c3677 /tests
parentd6c04d9a05c1b4066c09083a673d7d3cf61a3aa6 (diff)
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/TypefaceTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/TypefaceTest.cpp b/tests/TypefaceTest.cpp
index f7660bd2f0..415d64abb1 100644
--- a/tests/TypefaceTest.cpp
+++ b/tests/TypefaceTest.cpp
@@ -109,7 +109,7 @@ DEF_TEST(TypefaceAxes, reporter) {
SkFontArguments params;
params.setVariationDesignPosition({position, SK_ARRAY_COUNT(position)});
// TODO: if axes are set and the back-end doesn't support them, should we create the typeface?
- sk_sp<SkTypeface> typeface(fm->createFromStream(distortable.release(), params));
+ sk_sp<SkTypeface> typeface = fm->makeFromStream(std::move(distortable), params);
int count = typeface->getVariationDesignPosition(nullptr, 0);
if (count == -1) {
@@ -140,7 +140,7 @@ DEF_TEST(TypefaceVariationIndex, reporter) {
SkFontArguments params;
// The first named variation position in Distortable is 'Thin'.
params.setCollectionIndex(0x00010000);
- sk_sp<SkTypeface> typeface(fm->createFromStream(distortable.release(), params));
+ sk_sp<SkTypeface> typeface = fm->makeFromStream(std::move(distortable), params);
if (!typeface) {
// FreeType is the only weird thing that supports this, Skia just needs to make sure if it
// gets one of these things make sense.