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

Unified Diff: tests/PaintImageFilterTest.cpp

Issue 1793303002: Reland of "more shader-->sp conversions (patchset #5 id:80001 of https://codereview.chromium… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: make pictureRef a value, so its clearer what's going on 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/ImageFilterTest.cpp ('k') | tests/PictureShaderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PaintImageFilterTest.cpp
diff --git a/tests/PaintImageFilterTest.cpp b/tests/PaintImageFilterTest.cpp
index b71fe471196f88b9604730b582cf53a191e80542..f1c0c2eb9739bd563273e15da4c0c4ff19f60a5a 100644
--- a/tests/PaintImageFilterTest.cpp
+++ b/tests/PaintImageFilterTest.cpp
@@ -30,10 +30,9 @@ static void test_unscaled(skiatest::Reporter* reporter) {
SkScalar pos[] = {0, SK_ScalarHalf, SK_Scalar1};
SkScalar radius = SkIntToScalar(5);
- SkAutoTUnref<SkShader> s(SkGradientShader::CreateRadial(
- center, radius, colors, pos, SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode));
SkPaint gradientPaint;
- gradientPaint.setShader(s);
+ gradientPaint.setShader(SkGradientShader::MakeRadial(
+ center, radius, colors, pos, SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode));
// Test using the image filter
{
@@ -77,10 +76,9 @@ static void test_scaled(skiatest::Reporter* reporter) {
SkScalar pos[] = {0, SK_ScalarHalf, SK_Scalar1};
SkScalar radius = SkIntToScalar(5);
- SkAutoTUnref<SkShader> s(SkGradientShader::CreateRadial(
- center, radius, colors, pos, SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode));
SkPaint gradientPaint;
- gradientPaint.setShader(s);
+ gradientPaint.setShader(SkGradientShader::MakeRadial(
+ center, radius, colors, pos, SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode));
// Test using the image filter
{
« no previous file with comments | « tests/ImageFilterTest.cpp ('k') | tests/PictureShaderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698