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

Unified Diff: tests/PathTest.cpp

Issue 1817383002: switch surface to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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/IndexedPngOverflowTest.cpp ('k') | tests/ReadPixelsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « tests/IndexedPngOverflowTest.cpp ('k') | tests/ReadPixelsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698