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

Unified Diff: gm/texteffects.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/textblobuseaftergpufree.cpp ('k') | include/core/SkTextBlob.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/texteffects.cpp
diff --git a/gm/texteffects.cpp b/gm/texteffects.cpp
index c89b4e003b2a08b9709ce79a01fad979f175cca5..6a5a9c1fb0ef188cd9026d7caa618b5aa62a1962 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 };
« no previous file with comments | « gm/textblobuseaftergpufree.cpp ('k') | include/core/SkTextBlob.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698