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

Unified Diff: tests/SpecialSurfaceTest.cpp

Issue 1896383003: Begin removing deprecated (and now, unused) ImageFilter code paths (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix comment Created 4 years, 8 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/SpecialImageTest.cpp ('k') | tests/TestingSpecialImageAccess.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « tests/SpecialImageTest.cpp ('k') | tests/TestingSpecialImageAccess.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698