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

Unified Diff: tests/SpecialSurfaceTest.cpp

Issue 1925313002: Tighten up SkSpecialSurface factory functions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/ImageFilterTest.cpp ('k') | no next file » | 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 8c560fef7990312b3247bd9a4dd448de87c26d83..3c351a527cb3dd3f47ee072af623c236220b364e 100644
--- a/tests/SpecialSurfaceTest.cpp
+++ b/tests/SpecialSurfaceTest.cpp
@@ -79,35 +79,11 @@ DEF_TEST(SpecialSurface_Raster2, reporter) {
#if SK_SUPPORT_GPU
DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SpecialSurface_Gpu1, reporter, ctxInfo) {
- GrSurfaceDesc desc;
- desc.fConfig = kSkia8888_GrPixelConfig;
- desc.fFlags = kRenderTarget_GrSurfaceFlag;
- desc.fWidth = kSmallerSize;
- desc.fHeight = kSmallerSize;
-
- sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeRenderTarget(ctxInfo.fGrContext, desc));
+ sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeRenderTarget(ctxInfo.fGrContext,
+ kSmallerSize, kSmallerSize,
+ kSkia8888_GrPixelConfig));
test_surface(surf, reporter, 0);
}
-// test the more flexible factory
-DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SpecialSurface_Gpu2, reporter, ctxInfo) {
- GrSurfaceDesc desc;
- desc.fConfig = kSkia8888_GrPixelConfig;
- desc.fFlags = kRenderTarget_GrSurfaceFlag;
- desc.fWidth = kFullSize;
- desc.fHeight = kFullSize;
-
- sk_sp<GrTexture> temp(ctxInfo.fGrContext->textureProvider()->createApproxTexture(desc));
- SkASSERT_RELEASE(temp);
-
- const SkIRect subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize);
-
- sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeFromTexture(subset, std::move(temp)));
-
- test_surface(surf, reporter, kPad);
-
- // TODO: check that the clear didn't escape the active region
-}
-
#endif
« no previous file with comments | « tests/ImageFilterTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698