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

Unified Diff: tests/ImageNewShaderTest.cpp

Issue 1785473002: SkImage now has makeShader to return sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use build guard for impl of newShader 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/FlattenableFactoryToName.cpp ('k') | tests/SkColor4fTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageNewShaderTest.cpp
diff --git a/tests/ImageNewShaderTest.cpp b/tests/ImageNewShaderTest.cpp
index 7b7d80e4771b48c31744230ac3f3d6b843c44af9..0822dbd054a072d88ad5f979c90deffc14d1048b 100644
--- a/tests/ImageNewShaderTest.cpp
+++ b/tests/ImageNewShaderTest.cpp
@@ -45,9 +45,9 @@ void runShaderTest(skiatest::Reporter* reporter, SkSurface* sourceSurface, SkSur
paintSource(sourceSurface);
SkAutoTUnref<SkImage> sourceImage(sourceSurface->newImageSnapshot());
- SkAutoTUnref<SkShader> sourceShader(sourceImage->newShader(
+ sk_sp<SkShader> sourceShader = sourceImage->makeShader(
SkShader::kRepeat_TileMode,
- SkShader::kRepeat_TileMode));
+ SkShader::kRepeat_TileMode);
SkPaint paint;
paint.setShader(sourceShader);
@@ -73,10 +73,10 @@ void runShaderTest(skiatest::Reporter* reporter, SkSurface* sourceSurface, SkSur
SkMatrix matrix;
matrix.setTranslate(SkIntToScalar(-1), SkIntToScalar(0));
- SkAutoTUnref<SkShader> sourceShaderTranslated(sourceImage->newShader(
+ sk_sp<SkShader> sourceShaderTranslated = sourceImage->makeShader(
SkShader::kRepeat_TileMode,
SkShader::kRepeat_TileMode,
- &matrix));
+ &matrix);
destinationCanvas->clear(SK_ColorTRANSPARENT);
« no previous file with comments | « tests/FlattenableFactoryToName.cpp ('k') | tests/SkColor4fTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698