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

Unified Diff: tests/GradientTest.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/GrTextureMipMapInvalidationTest.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GradientTest.cpp
diff --git a/tests/GradientTest.cpp b/tests/GradientTest.cpp
index 65210705526e47e6574dcdf061313f77c4ed2ae2..0014089322c6003bb16869cde88a1061619b6cad 100644
--- a/tests/GradientTest.cpp
+++ b/tests/GradientTest.cpp
@@ -184,7 +184,7 @@ static void TestGradientShaders(skiatest::Reporter* reporter) {
}
static void test_nearly_vertical(skiatest::Reporter* reporter) {
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(200, 200));
+ auto surface(SkSurface::MakeRasterN32Premul(200, 200));
const SkPoint pts[] = {{ 100, 50 }, { 100.0001f, 50000 }};
const SkColor colors[] = { SK_ColorBLACK, SK_ColorWHITE };
@@ -200,7 +200,7 @@ static void test_nearly_vertical(skiatest::Reporter* reporter) {
// The old code had an assert which this test triggered.
// We now explicitly clamp the resulting fx value.
static void test_linear_fuzz(skiatest::Reporter* reporter) {
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(1300, 630));
+ auto surface(SkSurface::MakeRasterN32Premul(1300, 630));
const SkPoint pts[] = {{ 179.5f, -179.5f }, { 1074.5f, 715.5f }};
const SkColor colors[] = { SK_ColorBLACK, SK_ColorWHITE, SK_ColorBLACK, SK_ColorWHITE };
@@ -216,7 +216,7 @@ static void test_linear_fuzz(skiatest::Reporter* reporter) {
// https://bugs.chromium.org/p/skia/issues/detail?id=5023
// We should still shade pixels for which the radius is exactly 0.
static void test_two_point_conical_zero_radius(skiatest::Reporter* reporter) {
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(5, 5));
+ auto surface(SkSurface::MakeRasterN32Premul(5, 5));
surface->getCanvas()->clear(SK_ColorRED);
const SkColor colors[] = { SK_ColorGREEN, SK_ColorBLUE };
« no previous file with comments | « tests/GrTextureMipMapInvalidationTest.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698