Use sk_sp text blob APIs
SkTextBlobBuilder::build() -> make()
SkAutoTUnref<const SkTextBlob> -> sk_sp<SkTextBlob>
drawTextBlob(const SkTextBlob*) -> drawTextBlob(const sk_sp<SkTextBlob>&)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2335493005
Review-Url: https://codereview.chromium.org/2335493005
diff --git a/gm/textblobgeometrychange.cpp b/gm/textblobgeometrychange.cpp
index 9e33e95..f84a55f 100644
--- a/gm/textblobgeometrychange.cpp
+++ b/gm/textblobgeometrychange.cpp
@@ -40,7 +40,7 @@
sk_tool_utils::add_to_text_blob(&builder, text, paint, 10, 10);
- SkAutoTUnref<const SkTextBlob> blob(builder.build());
+ sk_sp<SkTextBlob> blob(builder.make());
SkImageInfo info = SkImageInfo::MakeN32Premul(200, 200);
SkSurfaceProps props(0, kUnknown_SkPixelGeometry);
@@ -55,12 +55,12 @@
SkPaint rectPaint;
rectPaint.setColor(0xffffffff);
canvas->drawRect(rect, rectPaint);
- canvas->drawTextBlob(blob.get(), 10, 50, paint);
+ canvas->drawTextBlob(blob, 10, 50, paint);
// This should not look garbled since we should disable LCD text in this case
// (i.e., unknown pixel geometry)
c->clear(0x00ffffff);
- c->drawTextBlob(blob.get(), 10, 150, paint);
+ c->drawTextBlob(blob, 10, 150, paint);
surface->draw(canvas, 0, 0, nullptr);
}