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

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
Index: tests/ImageFilterTest.cpp
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index c2230b7cdb8733c9edae75a6cd983e8086a4abfa..76ebafeb26c40524e2526061e156e5aa34b1663a 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -97,7 +97,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;
@@ -1492,7 +1492,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()));
@@ -1559,7 +1559,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());
}
@@ -1594,9 +1594,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

Powered by Google App Engine
This is Rietveld 408576698