Index: tests/XfermodeTest.cpp |
diff --git a/tests/XfermodeTest.cpp b/tests/XfermodeTest.cpp |
index 294d63db59adb490f4045d2752f1660c467bd8ce..c3a4d967852308fe147880fd5754fe3ed768c85c 100644 |
--- a/tests/XfermodeTest.cpp |
+++ b/tests/XfermodeTest.cpp |
@@ -13,7 +13,7 @@ |
static void test_asMode(skiatest::Reporter* reporter) { |
for (int mode = 0; mode <= SkXfermode::kLastMode; mode++) { |
- SkXfermode* xfer = SkXfermode::Create((SkXfermode::Mode) mode); |
+ auto xfer = SkXfermode::Make((SkXfermode::Mode) mode); |
SkXfermode::Mode reportedMode = ILLEGAL_MODE; |
REPORTER_ASSERT(reporter, reportedMode != mode); |
@@ -27,7 +27,6 @@ static void test_asMode(skiatest::Reporter* reporter) { |
reportedMode = (SkXfermode::Mode) -1; |
REPORTER_ASSERT(reporter, xfer->asMode(&reportedMode)); |
REPORTER_ASSERT(reporter, reportedMode == mode); |
- xfer->unref(); |
} else { |
REPORTER_ASSERT(reporter, SkXfermode::kSrcOver_Mode == mode); |
} |
@@ -41,9 +40,8 @@ static void test_IsMode(skiatest::Reporter* reporter) { |
for (int i = 0; i <= SkXfermode::kLastMode; ++i) { |
SkXfermode::Mode mode = (SkXfermode::Mode)i; |
- SkXfermode* xfer = SkXfermode::Create(mode); |
+ auto xfer = SkXfermode::Make(mode); |
REPORTER_ASSERT(reporter, SkXfermode::IsMode(xfer, mode)); |
- SkSafeUnref(xfer); |
if (SkXfermode::kSrcOver_Mode != mode) { |
REPORTER_ASSERT(reporter, !SkXfermode::IsMode(nullptr, mode)); |