Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: gm/textblob.cpp

Issue 2335493005: Use sk_sp text blob APIs (Closed)
Patch Set: SK_SUPPORT_LEGACY_TEXTBLOB_BUILDER Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/mixedtextblobs.cpp ('k') | gm/textblobblockreordering.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/textblob.cpp
diff --git a/gm/textblob.cpp b/gm/textblob.cpp
index 2ac7d27f07980ec7a24efccae438af412737b440..aa2bfb04a8bd05f1ff472e1b0683a9036d425f61 100644
--- a/gm/textblob.cpp
+++ b/gm/textblob.cpp
@@ -92,7 +92,7 @@ protected:
void onDraw(SkCanvas* canvas) override {
for (unsigned b = 0; b < SK_ARRAY_COUNT(blobConfigs); ++b) {
- SkAutoTUnref<const SkTextBlob> blob(this->makeBlob(b));
+ sk_sp<SkTextBlob> blob(this->makeBlob(b));
SkPaint p;
SkPoint offset = SkPoint::Make(SkIntToScalar(10 + 300 * (b % 2)),
@@ -110,7 +110,7 @@ protected:
}
private:
- const SkTextBlob* makeBlob(unsigned blobIndex) {
+ sk_sp<SkTextBlob> makeBlob(unsigned blobIndex) {
SkTextBlobBuilder builder;
SkPaint font;
@@ -177,7 +177,7 @@ private:
}
}
- return builder.build();
+ return builder.make();
}
SkTDArray<uint16_t> fGlyphs;
« no previous file with comments | « gm/mixedtextblobs.cpp ('k') | gm/textblobblockreordering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698