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

Unified Diff: gm/textblobuseaftergpufree.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/textblobtransforms.cpp ('k') | gm/texteffects.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/textblobuseaftergpufree.cpp
diff --git a/gm/textblobuseaftergpufree.cpp b/gm/textblobuseaftergpufree.cpp
index c104e9b121f75ed99da3561038f4cb3aa830aec2..44fd85488ca62eaa297c1b7869d749132069a221 100644
--- a/gm/textblobuseaftergpufree.cpp
+++ b/gm/textblobuseaftergpufree.cpp
@@ -47,18 +47,18 @@ 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());
// draw textblob
SkRect rect = SkRect::MakeLTRB(0.f, 0.f, SkIntToScalar(kWidth), kHeight / 2.f);
SkPaint rectPaint;
rectPaint.setColor(0xffffffff);
canvas->drawRect(rect, rectPaint);
- canvas->drawTextBlob(blob.get(), 10, 50, paint);
+ canvas->drawTextBlob(blob, 10, 50, paint);
// This text should look fine
canvas->getGrContext()->freeGpuResources();
- canvas->drawTextBlob(blob.get(), 10, 150, paint);
+ canvas->drawTextBlob(blob, 10, 150, paint);
}
private:
« no previous file with comments | « gm/textblobtransforms.cpp ('k') | gm/texteffects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698