| Index: tests/FontObjTest.cpp
|
| diff --git a/tests/FontObjTest.cpp b/tests/FontObjTest.cpp
|
| index 66c8bd500f3c8a409666ad191b0489085ab2bb7e..9d18ce6b2ee7b989a2beec4f482c74f449d5079d 100644
|
| --- a/tests/FontObjTest.cpp
|
| +++ b/tests/FontObjTest.cpp
|
| @@ -23,7 +23,7 @@
|
| }
|
|
|
| static void test_cachedfont(skiatest::Reporter* reporter, const SkPaint& paint) {
|
| - sk_sp<SkFont> font(SkFont::Testing_CreateFromPaint(paint));
|
| + SkAutoTUnref<SkFont> font(SkFont::Testing_CreateFromPaint(paint));
|
|
|
| // Currently SkFont resolves null into the default, so only test if paint's is not null
|
| if (paint.getTypeface()) {
|
| @@ -78,7 +78,8 @@
|
| char txt[] = "long.text.with.lots.of.dots.";
|
|
|
| for (size_t i = 0; i < SK_ARRAY_COUNT(faces); i++) {
|
| - paint.setTypeface(SkTypeface::MakeFromName(faces[i], SkTypeface::kNormal));
|
| + SkAutoTUnref<SkTypeface> face(SkTypeface::CreateFromName(faces[i], SkTypeface::kNormal));
|
| + paint.setTypeface(face);
|
|
|
| for (size_t j = 0; j < SK_ARRAY_COUNT(settings); j++) {
|
| paint.setHinting(settings[j].hinting);
|
| @@ -102,7 +103,7 @@
|
|
|
| REPORTER_ASSERT(reporter, width1 == width2);
|
|
|
| - sk_sp<SkFont> font(SkFont::Testing_CreateFromPaint(paint));
|
| + SkAutoTUnref<SkFont> font(SkFont::Testing_CreateFromPaint(paint));
|
| SkScalar font_width1 = font->measureText(txt, strlen(txt), kUTF8_SkTextEncoding);
|
| // measureText not yet implemented...
|
| REPORTER_ASSERT(reporter, font_width1 == -1);
|
|
|