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

Unified Diff: tests/PaintTest.cpp

Issue 1933393002: Move SkTypeface to sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Restore deleted Android code. Created 4 years, 7 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 | « tests/PDFPrimitivesTest.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PaintTest.cpp
diff --git a/tests/PaintTest.cpp b/tests/PaintTest.cpp
index bd00adb18d288fce132a75435261f29be6a9868e..f50746777149f68f2aef5517a2de9976e8e450eb 100644
--- a/tests/PaintTest.cpp
+++ b/tests/PaintTest.cpp
@@ -80,7 +80,7 @@ DEF_TEST(Paint_cmap, reporter) {
SkRandom rand;
SkPaint paint;
- paint.setTypeface(SkTypeface::RefDefault())->unref();
+ paint.setTypeface(SkTypeface::MakeDefault());
SkTypeface* face = paint.getTypeface();
for (int i = 0; i < 1000; ++i) {
@@ -333,7 +333,7 @@ DEF_TEST(Paint_getHash, r) {
REPORTER_ASSERT(r, paint.getHash() == defaultHash);
// SkTypeface is the first field we hash, so test it specially.
- paint.setTypeface(SkTypeface::RefDefault())->unref();
+ paint.setTypeface(SkTypeface::MakeDefault());
REPORTER_ASSERT(r, paint.getHash() != defaultHash);
paint.setTypeface(nullptr);
REPORTER_ASSERT(r, paint.getHash() == defaultHash);
« no previous file with comments | « tests/PDFPrimitivesTest.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698