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

Unified Diff: gm/mixedtextblobs.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/lcdoverlap.cpp ('k') | gm/textblob.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/mixedtextblobs.cpp
diff --git a/gm/mixedtextblobs.cpp b/gm/mixedtextblobs.cpp
index 66e2379ee67ab86b0b51072800f3f247d020ffd9..00081d0778c03b016f2f3d862daaaf26f33c50f5 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;
« no previous file with comments | « gm/lcdoverlap.cpp ('k') | gm/textblob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698