| Index: tests/SpecialSurfaceTest.cpp
|
| diff --git a/tests/SpecialSurfaceTest.cpp b/tests/SpecialSurfaceTest.cpp
|
| index db1aaf0038e09785665b07c7397258ef7ba8df9d..7169b5e8e2204149d4c90de0facb49a5ba1b70ca 100644
|
| --- a/tests/SpecialSurfaceTest.cpp
|
| +++ b/tests/SpecialSurfaceTest.cpp
|
| @@ -20,10 +20,6 @@ public:
|
| static const SkIRect& Subset(const SkSpecialSurface* surf) {
|
| return surf->subset();
|
| }
|
| -
|
| - static const SkIRect& Subset(const SkSpecialImage* img) {
|
| - return img->subset();
|
| - }
|
| };
|
|
|
| // Both 'kSmallerSize' and 'kFullSize' need to be a non-power-of-2 to exercise
|
| @@ -51,7 +47,7 @@ static void test_surface(const sk_sp<SkSpecialSurface>& surf,
|
| sk_sp<SkSpecialImage> img(surf->makeImageSnapshot());
|
| REPORTER_ASSERT(reporter, img);
|
|
|
| - const SkIRect imgSubset = TestingSpecialSurfaceAccess::Subset(img.get());
|
| + const SkIRect imgSubset = img->subset();
|
| REPORTER_ASSERT(reporter, surfSubset == imgSubset);
|
|
|
| // the canvas was invalidated by the newImageSnapshot call
|
| @@ -61,7 +57,7 @@ static void test_surface(const sk_sp<SkSpecialSurface>& surf,
|
| DEF_TEST(SpecialSurface_Raster, reporter) {
|
|
|
| SkImageInfo info = SkImageInfo::MakeN32(kSmallerSize, kSmallerSize, kOpaque_SkAlphaType);
|
| - sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeRaster(nullptr, info));
|
| + sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeRaster(info));
|
|
|
| test_surface(surf, reporter, 0);
|
| }
|
| @@ -73,7 +69,7 @@ DEF_TEST(SpecialSurface_Raster2, reporter) {
|
|
|
| const SkIRect subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize);
|
|
|
| - sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeFromBitmap(nullptr, subset, bm));
|
| + sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeFromBitmap(subset, bm));
|
|
|
| test_surface(surf, reporter, kPad);
|
|
|
| @@ -89,8 +85,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SpecialSurface_Gpu1, reporter, ctxInfo) {
|
| desc.fWidth = kSmallerSize;
|
| desc.fHeight = kSmallerSize;
|
|
|
| - sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeRenderTarget(nullptr, ctxInfo.fGrContext,
|
| - desc));
|
| + sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeRenderTarget(ctxInfo.fGrContext, desc));
|
|
|
| test_surface(surf, reporter, 0);
|
| }
|
| @@ -108,7 +103,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SpecialSurface_Gpu2, reporter, ctxInfo) {
|
|
|
| const SkIRect subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize);
|
|
|
| - sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeFromTexture(nullptr, subset, temp));
|
| + sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeFromTexture(subset, temp));
|
|
|
| test_surface(surf, reporter, kPad);
|
|
|
|
|