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/mixedtextblobs.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/mixedtextblobs.cpp')
-rw-r--r-- | gm/mixedtextblobs.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gm/mixedtextblobs.cpp b/gm/mixedtextblobs.cpp index 66e2379ee6..00081d0778 100644 --- a/gm/mixedtextblobs.cpp +++ b/gm/mixedtextblobs.cpp @@ -94,7 +94,7 @@ protected: text = "aA"; paint.setTypeface(fReallyBigATypeface); sk_tool_utils::add_to_text_blob(&builder, text, paint, corruptedAx, corruptedAy); - fBlob.reset(builder.build()); + fBlob = builder.make(); } SkString onShortName() override { @@ -138,7 +138,7 @@ protected: size_t count = sizeof(clipRects) / sizeof(SkRect); for (size_t x = 0; x < count; ++x) { - draw_blob(canvas, fBlob, paint, clipRects[x]); + draw_blob(canvas, fBlob.get(), paint, clipRects[x]); if (x == (count >> 1) - 1) { canvas->translate(SkScalarFloorToScalar(bounds.width() + SkIntToScalar(25)), -(x * SkScalarFloorToScalar(bounds.height() + @@ -153,7 +153,7 @@ private: sk_sp<SkTypeface> fEmojiTypeface; sk_sp<SkTypeface> fReallyBigATypeface; const char* fEmojiText; - SkAutoTUnref<const SkTextBlob> fBlob; + sk_sp<SkTextBlob> fBlob; static constexpr int kWidth = 1250; static constexpr int kHeight = 700; |