Index: tests/TextBlobTest.cpp |
diff --git a/tests/TextBlobTest.cpp b/tests/TextBlobTest.cpp |
index 82bbb21a11b6d1655eadef245c072fe52251dc78..dafbe74e69c8b8d0bf185408fd6c865cb9ef5323 100644 |
--- a/tests/TextBlobTest.cpp |
+++ b/tests/TextBlobTest.cpp |
@@ -104,28 +104,28 @@ public: |
// Explicit bounds. |
{ |
- SkAutoTUnref<const SkTextBlob> blob(builder.build()); |
+ sk_sp<SkTextBlob> blob(builder.make()); |
REPORTER_ASSERT(reporter, blob->bounds().isEmpty()); |
} |
{ |
SkRect r1 = SkRect::MakeXYWH(10, 10, 20, 20); |
builder.allocRun(font, 16, 0, 0, &r1); |
- SkAutoTUnref<const SkTextBlob> blob(builder.build()); |
+ sk_sp<SkTextBlob> blob(builder.make()); |
REPORTER_ASSERT(reporter, blob->bounds() == r1); |
} |
{ |
SkRect r1 = SkRect::MakeXYWH(10, 10, 20, 20); |
builder.allocRunPosH(font, 16, 0, &r1); |
- SkAutoTUnref<const SkTextBlob> blob(builder.build()); |
+ sk_sp<SkTextBlob> blob(builder.make()); |
REPORTER_ASSERT(reporter, blob->bounds() == r1); |
} |
{ |
SkRect r1 = SkRect::MakeXYWH(10, 10, 20, 20); |
builder.allocRunPos(font, 16, &r1); |
- SkAutoTUnref<const SkTextBlob> blob(builder.build()); |
+ sk_sp<SkTextBlob> blob(builder.make()); |
REPORTER_ASSERT(reporter, blob->bounds() == r1); |
} |
@@ -138,13 +138,13 @@ public: |
builder.allocRunPosH(font, 16, 0, &r2); |
builder.allocRunPos(font, 16, &r3); |
- SkAutoTUnref<const SkTextBlob> blob(builder.build()); |
+ sk_sp<SkTextBlob> blob(builder.make()); |
REPORTER_ASSERT(reporter, blob->bounds() == SkRect::MakeXYWH(0, 5, 65, 65)); |
} |
{ |
// Verify empty blob bounds after building some non-empty blobs. |
- SkAutoTUnref<const SkTextBlob> blob(builder.build()); |
+ sk_sp<SkTextBlob> blob(builder.make()); |
REPORTER_ASSERT(reporter, blob->bounds().isEmpty()); |
} |
@@ -168,7 +168,7 @@ public: |
p.textToGlyphs(txt, txtLen, buffer.glyphs); |
memset(buffer.pos, 0, sizeof(SkScalar) * glyphCount * 2); |
- SkAutoTUnref<const SkTextBlob> blob(builder.build()); |
+ sk_sp<SkTextBlob> blob(builder.make()); |
REPORTER_ASSERT(reporter, blob->bounds().isEmpty()); |
} |
} |
@@ -224,9 +224,9 @@ public: |
AddRun(font, 1, SkTextBlob::kDefault_Positioning, SkPoint::Make(0, 0), builder); |
AddRun(font, 1, SkTextBlob::kHorizontal_Positioning, SkPoint::Make(0, 0), builder); |
AddRun(font, 1, SkTextBlob::kFull_Positioning, SkPoint::Make(0, 0), builder); |
- SkAutoTUnref<const SkTextBlob> blob(builder.build()); |
+ sk_sp<SkTextBlob> blob(builder.make()); |
- SkTextBlobRunIterator it(blob); |
+ SkTextBlobRunIterator it(blob.get()); |
while (!it.done()) { |
SkPaint paint; |
it.applyFontToPaint(&paint); |
@@ -278,9 +278,9 @@ private: |
posCount += in[i].count * in[i].pos; |
} |
- SkAutoTUnref<const SkTextBlob> blob(builder.build()); |
+ sk_sp<SkTextBlob> blob(builder.make()); |
- SkTextBlobRunIterator it(blob); |
+ SkTextBlobRunIterator it(blob.get()); |
for (unsigned i = 0; i < outCount; ++i) { |
REPORTER_ASSERT(reporter, !it.done()); |
REPORTER_ASSERT(reporter, out[i].pos == it.positioning()); |
@@ -368,7 +368,7 @@ DEF_TEST(TextBlob_extended, reporter) { |
for (int i = 0; i < glyphCount; ++i) { |
run.clusters[i] = SkTMin(SkToU32(i), SkToU32(strlen(text2))); |
} |
- sk_sp<const SkTextBlob> blob(textBlobBuilder.build()); |
+ sk_sp<SkTextBlob> blob(textBlobBuilder.make()); |
REPORTER_ASSERT(reporter, blob); |
for (SkTextBlobRunIterator it(blob.get()); !it.done(); it.next()) { |