diff options
author | fmalita <fmalita@chromium.org> | 2016-09-13 10:00:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-13 10:00:23 -0700 |
commit | 37283c28aa5bea2204c18956e74f83b238d7a891 (patch) | |
tree | 6ac125088f1df0c6d9380e323e873c72c8416b0b /gm/texteffects.cpp | |
parent | ec44099979acd3e83ad93a15dbd9301856a90572 (diff) |
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
Diffstat (limited to 'gm/texteffects.cpp')
-rw-r--r-- | gm/texteffects.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gm/texteffects.cpp b/gm/texteffects.cpp index c89b4e003b..6a5a9c1fb0 100644 --- a/gm/texteffects.cpp +++ b/gm/texteffects.cpp @@ -351,7 +351,7 @@ DEF_SIMPLE_GM(fancyposunderline, canvas, 900, 1350) { namespace { -sk_sp<const SkTextBlob> MakeFancyBlob(const SkPaint& paint, const char* text) { +sk_sp<SkTextBlob> MakeFancyBlob(const SkPaint& paint, const char* text) { SkPaint blobPaint(paint); const size_t textLen = strlen(text); @@ -411,7 +411,7 @@ sk_sp<const SkTextBlob> MakeFancyBlob(const SkPaint& paint, const char* text) { } } - return sk_sp<const SkTextBlob>(blobBuilder.build()); + return blobBuilder.make(); } } // anonymous ns @@ -431,8 +431,8 @@ DEF_SIMPLE_GM(fancyblobunderline, canvas, 1480, 1380) { paint.setStrokeWidth(uWidth); paint.setStyle(SkPaint::kFill_Style); - sk_sp<const SkTextBlob> blob = MakeFancyBlob(paint, test); - canvas->drawTextBlob(blob.get(), blobOffset.x(), blobOffset.y(), paint); + sk_sp<SkTextBlob> blob = MakeFancyBlob(paint, test); + canvas->drawTextBlob(blob, blobOffset.x(), blobOffset.y(), paint); const SkScalar uPos = uWidth; const SkScalar bounds[2] = { uPos - uWidth / 2, uPos + uWidth / 2 }; |