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

Unified Diff: tests/WritePixelsTest.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/TextureStorageAllocator.cpp ('k') | tools/VisualBench/VisualBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/WritePixelsTest.cpp
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp
index 0141bf351f230a591ef43955fd8134a847027ff2..6dda6ff89ee70f7beec92c40ad5d3962e7417d1e 100644
--- a/tests/WritePixelsTest.cpp
+++ b/tests/WritePixelsTest.cpp
@@ -294,7 +294,7 @@ static void call_writepixels(SkCanvas* canvas) {
DEF_TEST(WritePixelsSurfaceGenID, reporter) {
const SkImageInfo info = SkImageInfo::MakeN32Premul(100, 100);
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRaster(info));
+ auto surface(SkSurface::MakeRaster(info));
uint32_t genID1 = surface->generationID();
call_writepixels(surface->getCanvas());
uint32_t genID2 = surface->generationID();
@@ -400,8 +400,9 @@ DEF_TEST(WritePixels, reporter) {
if (!tightRowBytes) {
memset(pixels, DEV_PAD, size);
}
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterDirectReleaseProc(info, pixels, rowBytes, free_pixels, nullptr));
- test_write_pixels(reporter, surface);
+ auto surface(SkSurface::MakeRasterDirectReleaseProc(info, pixels, rowBytes,
+ free_pixels, nullptr));
+ test_write_pixels(reporter, surface.get());
}
}
#if SK_SUPPORT_GPU
@@ -415,8 +416,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WritePixels_Gpu, reporter, context) {
desc.fOrigin = origin;
SkAutoTUnref<GrTexture> texture(context->textureProvider()->createTexture(desc,
SkBudgeted::kNo));
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTargetDirect(texture->asRenderTarget()));
- test_write_pixels(reporter, surface);
+ auto surface(SkSurface::MakeRenderTargetDirect(texture->asRenderTarget()));
+ test_write_pixels(reporter, surface.get());
}
}
#endif
« no previous file with comments | « tests/TextureStorageAllocator.cpp ('k') | tools/VisualBench/VisualBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698