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

Unified Diff: gm/textblobgeometrychange.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/textblobcolortrans.cpp ('k') | gm/textbloblooper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/textblobgeometrychange.cpp
diff --git a/gm/textblobgeometrychange.cpp b/gm/textblobgeometrychange.cpp
index 9e33e95e74af728e9c581965fe6d892e6f19a4f9..f84a55fbf4d554e07796cd42934eab48e307f836 100644
--- a/gm/textblobgeometrychange.cpp
+++ b/gm/textblobgeometrychange.cpp
@@ -40,7 +40,7 @@ protected:
sk_tool_utils::add_to_text_blob(&builder, text, paint, 10, 10);
- SkAutoTUnref<const SkTextBlob> blob(builder.build());
+ sk_sp<SkTextBlob> blob(builder.make());
SkImageInfo info = SkImageInfo::MakeN32Premul(200, 200);
SkSurfaceProps props(0, kUnknown_SkPixelGeometry);
@@ -55,12 +55,12 @@ protected:
SkPaint rectPaint;
rectPaint.setColor(0xffffffff);
canvas->drawRect(rect, rectPaint);
- canvas->drawTextBlob(blob.get(), 10, 50, paint);
+ canvas->drawTextBlob(blob, 10, 50, paint);
// This should not look garbled since we should disable LCD text in this case
// (i.e., unknown pixel geometry)
c->clear(0x00ffffff);
- c->drawTextBlob(blob.get(), 10, 150, paint);
+ c->drawTextBlob(blob, 10, 150, paint);
surface->draw(canvas, 0, 0, nullptr);
}
« no previous file with comments | « gm/textblobcolortrans.cpp ('k') | gm/textbloblooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698