diff options
author | reed <reed@google.com> | 2016-03-23 18:59:25 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-23 18:59:25 -0700 |
commit | e8f3062a36d3682f4019309a32b5b84dc9eddf8c (patch) | |
tree | ff5cd50c65edb6e3b77f77327165ad0162557137 /tests/GradientTest.cpp | |
parent | 041c870425eb0a3e2b0cbc46581b3da2f50571d9 (diff) |
switch surface to sk_sp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1817383002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
Review URL: https://codereview.chromium.org/1817383002
Diffstat (limited to 'tests/GradientTest.cpp')
-rw-r--r-- | tests/GradientTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/GradientTest.cpp b/tests/GradientTest.cpp index 6521070552..0014089322 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 }; |