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

Unified Diff: src/utils/SkTextBox.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 | « src/utils/SkLua.cpp ('k') | tests/TextBlobCacheTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkTextBox.cpp
diff --git a/src/utils/SkTextBox.cpp b/src/utils/SkTextBox.cpp
index d237f4513c4b998da23dd73530319eee141a23d7..bc2e2217d95403711d232a09779f97afa7824fdc 100644
--- a/src/utils/SkTextBox.cpp
+++ b/src/utils/SkTextBox.cpp
@@ -292,11 +292,11 @@ public:
}
};
-SkTextBlob* SkTextBox::snapshotTextBlob(SkScalar* computedBottom) const {
+sk_sp<SkTextBlob> SkTextBox::snapshotTextBlob(SkScalar* computedBottom) const {
TextBlobVisitor visitor;
SkScalar newB = this->visit(visitor, fText, fLen, *fPaint);
if (computedBottom) {
*computedBottom = newB;
}
- return (SkTextBlob*)visitor.fBuilder.build();
+ return visitor.fBuilder.make();
}
« no previous file with comments | « src/utils/SkLua.cpp ('k') | tests/TextBlobCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698