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

Unified Diff: tests/ImageFilterTest.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/GradientTest.cpp ('k') | tests/ImageIsOpaqueTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageFilterTest.cpp
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index 3350b4a25f78d22e8a7c4055887c3f9ee34194db..acdd369ff3021e5c0303bda2a403e664bd63644f 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -231,7 +231,7 @@ void MatrixTestImageFilter::toString(SkString* str) const {
#endif
static sk_sp<SkImage> make_small_image() {
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(kBitmapSize, kBitmapSize));
+ auto surface(SkSurface::MakeRasterN32Premul(kBitmapSize, kBitmapSize));
SkCanvas* canvas = surface->getCanvas();
canvas->clear(0x00000000);
SkPaint darkPaint;
@@ -1495,7 +1495,7 @@ DEF_TEST(ImageFilterCanComputeFastBounds, reporter) {
// Verify that SkImageSource survives serialization
DEF_TEST(ImageFilterImageSourceSerialization, reporter) {
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(10, 10));
+ auto surface(SkSurface::MakeRasterN32Premul(10, 10));
surface->getCanvas()->clear(SK_ColorGREEN);
sk_sp<SkImage> image(surface->makeImageSnapshot());
SkAutoTUnref<SkImageFilter> filter(SkImageSource::Create(image.get()));
@@ -1562,7 +1562,7 @@ static void test_large_blur_input(skiatest::Reporter* reporter, SkCanvas* canvas
}
DEF_TEST(BlurLargeImage, reporter) {
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRaster(SkImageInfo::MakeN32Premul(100, 100)));
+ auto surface(SkSurface::MakeRaster(SkImageInfo::MakeN32Premul(100, 100)));
test_large_blur_input(reporter, surface->getCanvas());
}
@@ -1597,9 +1597,8 @@ DEF_GPUTEST_FOR_NATIVE_CONTEXT(XfermodeImageFilterCroppedInput_Gpu, reporter, co
}
DEF_GPUTEST_FOR_ALL_CONTEXTS(BlurLargeImage_Gpu, reporter, context) {
- SkAutoTUnref<SkSurface> surface(
- SkSurface::NewRenderTarget(context, SkBudgeted::kYes,
- SkImageInfo::MakeN32Premul(100, 100)));
+ auto surface(SkSurface::MakeRenderTarget(context, SkBudgeted::kYes,
+ SkImageInfo::MakeN32Premul(100, 100)));
test_large_blur_input(reporter, surface->getCanvas());
}
#endif
« no previous file with comments | « tests/GradientTest.cpp ('k') | tests/ImageIsOpaqueTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698