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

Unified Diff: tests/ImageNewShaderTest.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/ImageIsOpaqueTest.cpp ('k') | tests/ImageTest.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 b6266ed60de872c112141614e7773eb703fcfcd9..4ae0b6de8e58f76a03429bc5557777052e6b1894 100644
--- a/tests/ImageNewShaderTest.cpp
+++ b/tests/ImageNewShaderTest.cpp
@@ -104,8 +104,8 @@ void runShaderTest(skiatest::Reporter* reporter, SkSurface* sourceSurface, SkSur
DEF_TEST(ImageNewShader, reporter) {
SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5);
- SkAutoTUnref<SkSurface> sourceSurface(SkSurface::NewRaster(info));
- SkAutoTUnref<SkSurface> destinationSurface(SkSurface::NewRaster(info));
+ auto sourceSurface(SkSurface::MakeRaster(info));
+ auto destinationSurface(SkSurface::MakeRaster(info));
runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info);
}
@@ -115,10 +115,8 @@ DEF_TEST(ImageNewShader, reporter) {
void gpuToGpu(skiatest::Reporter* reporter, GrContext* context) {
SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5);
- SkAutoTUnref<SkSurface> sourceSurface(
- SkSurface::NewRenderTarget(context, SkBudgeted::kNo, info));
- SkAutoTUnref<SkSurface> destinationSurface(
- SkSurface::NewRenderTarget(context, SkBudgeted::kNo, info));
+ auto sourceSurface(SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info));
+ auto destinationSurface(SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info));
runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info);
}
@@ -126,9 +124,8 @@ void gpuToGpu(skiatest::Reporter* reporter, GrContext* context) {
void gpuToRaster(skiatest::Reporter* reporter, GrContext* context) {
SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5);
- SkAutoTUnref<SkSurface> sourceSurface(SkSurface::NewRenderTarget(context,
- SkBudgeted::kNo, info));
- SkAutoTUnref<SkSurface> destinationSurface(SkSurface::NewRaster(info));
+ auto sourceSurface(SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info));
+ auto destinationSurface(SkSurface::MakeRaster(info));
runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info);
}
@@ -136,9 +133,8 @@ void gpuToRaster(skiatest::Reporter* reporter, GrContext* context) {
void rasterToGpu(skiatest::Reporter* reporter, GrContext* context) {
SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5);
- SkAutoTUnref<SkSurface> sourceSurface(SkSurface::NewRaster(info));
- SkAutoTUnref<SkSurface> destinationSurface(SkSurface::NewRenderTarget(context,
- SkBudgeted::kNo, info));
+ auto sourceSurface(SkSurface::MakeRaster(info));
+ auto destinationSurface(SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info));
runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info);
}
« no previous file with comments | « tests/ImageIsOpaqueTest.cpp ('k') | tests/ImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698