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

Unified Diff: tests/TypefaceTest.cpp

Issue 1933393002: Move SkTypeface to sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments. Created 4 years, 8 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
Index: tests/TypefaceTest.cpp
diff --git a/tests/TypefaceTest.cpp b/tests/TypefaceTest.cpp
index 950449d9c1837706abcd5d69287d8adaef8e8624..6b6123de647ab1f800e3db399162b4538f1bb46a 100644
--- a/tests/TypefaceTest.cpp
+++ b/tests/TypefaceTest.cpp
@@ -12,8 +12,8 @@
DEF_TEST(Typeface, reporter) {
- SkAutoTUnref<SkTypeface> t1(SkTypeface::CreateFromName(nullptr, SkTypeface::kNormal));
- SkAutoTUnref<SkTypeface> t2(SkTypeface::RefDefault(SkTypeface::kNormal));
+ auto t1(SkTypeface::MakeFromName(nullptr, SkTypeface::kNormal));
+ auto t2(SkTypeface::MakeDefault(SkTypeface::kNormal));
f(malita) 2016/05/02 13:46:36 Nit: avoid auto for sk_sp
bungeman-skia 2016/05/02 20:24:55 Done.
REPORTER_ASSERT(reporter, SkTypeface::Equal(t1.get(), t2.get()));
REPORTER_ASSERT(reporter, SkTypeface::Equal(0, t1.get()));
@@ -22,8 +22,8 @@ DEF_TEST(Typeface, reporter) {
REPORTER_ASSERT(reporter, SkTypeface::Equal(t2.get(), 0));
#ifdef SK_BUILD_FOR_ANDROID
- SkAutoTUnref<SkTypeface> t3(SkTypeface::CreateFromName("non-existent-font", SkTypeface::kNormal));
- REPORTER_ASSERT(reporter, nullptr == t3.get());
+ auto t3(SkTypeface::MakeFromName("non-existent-font", SkTypeface::kNormal));
f(malita) 2016/05/02 13:46:36 Nit: ditto
bungeman-skia 2016/05/02 20:24:55 Done.
+ REPORTER_ASSERT(reporter, nullptr == t3);
#endif
}
« tests/TextBlobTest.cpp ('K') | « tests/TextBlobTest.cpp ('k') | tools/Resources.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698