Index: tests/PathTest.cpp |
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp |
index 2ba40005d40ce2cb11df1a9d02f302c71517813d..dd6f41cbfae83371ff2e399053fd752128988da1 100644 |
--- a/tests/PathTest.cpp |
+++ b/tests/PathTest.cpp |
@@ -99,7 +99,7 @@ static void make_path_crbug364224_simplified(SkPath* path) { |
static void test_path_crbug364224() { |
SkPath path; |
SkPaint paint; |
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(84, 88)); |
+ auto surface(SkSurface::MakeRasterN32Premul(84, 88)); |
SkCanvas* canvas = surface->getCanvas(); |
make_path_crbug364224_simplified(&path); |
@@ -293,7 +293,7 @@ static void test_bad_cubic_crbug234190() { |
SkPaint paint; |
paint.setAntiAlias(true); |
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(84, 88)); |
+ auto surface(SkSurface::MakeRasterN32Premul(84, 88)); |
surface->getCanvas()->drawPath(path, paint); |
} |
@@ -412,7 +412,7 @@ static void test_crbug_170666() { |
SkPaint paint; |
paint.setAntiAlias(true); |
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(1000, 1000)); |
+ auto surface(SkSurface::MakeRasterN32Premul(1000, 1000)); |
build_path_simple_170666(path); |
surface->getCanvas()->drawPath(path, paint); |
@@ -553,7 +553,7 @@ static void build_big_path(SkPath* path, bool reducedCase) { |
} |
static void test_clipped_cubic() { |
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(640, 480)); |
+ auto surface(SkSurface::MakeRasterN32Premul(640, 480)); |
// This path used to assert, because our cubic-chopping code incorrectly |
// moved control points after the chop. This test should be run in SK_DEBUG |
@@ -626,9 +626,7 @@ static void test_tricky_cubic() { |
SkPaint paint; |
paint.setAntiAlias(true); |
- SkSurface* surface = SkSurface::NewRasterN32Premul(19, 130); |
- surface->getCanvas()->drawPath(path, paint); |
- surface->unref(); |
+ SkSurface::MakeRasterN32Premul(19, 130)->getCanvas()->drawPath(path, paint); |
} |
// Inspired by http://code.google.com/p/chromium/issues/detail?id=141651 |