From c7ad40f76f6f23b3acd73b53e989220fd71f2da2 Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Thu, 31 May 2018 14:27:17 -0400 Subject: Remove SK_SUPPORT_GPU checks in tool-only code Most of this is (obviously) not necessary to do, but once I started, I figured I'd just get it all. Tools (nanobench, DM, skiaserve), all GMs, benches, and unit tests, plus support code (command line parsing and config stuff). This is almost entirely mechanical. Bug: skia: Change-Id: I209500f8df8c5bd43f8298ff26440d1c4d7425fb Reviewed-on: https://skia-review.googlesource.com/131153 Reviewed-by: Mike Klein Reviewed-by: Brian Salomon Commit-Queue: Brian Osman --- tests/SpecialImageTest.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'tests/SpecialImageTest.cpp') diff --git a/tests/SpecialImageTest.cpp b/tests/SpecialImageTest.cpp index 719a3afec6..b2f8743b0e 100644 --- a/tests/SpecialImageTest.cpp +++ b/tests/SpecialImageTest.cpp @@ -15,7 +15,6 @@ #include "SkSurface.h" #include "Test.h" -#if SK_SUPPORT_GPU #include "GrBackendSurface.h" #include "GrContext.h" #include "GrContextPriv.h" @@ -23,7 +22,6 @@ #include "GrSurfaceProxy.h" #include "GrTextureProxy.h" #include "SkGr.h" -#endif // This test creates backing resources exactly sized to [kFullSize x kFullSize]. @@ -68,14 +66,12 @@ static void test_image(const sk_sp& img, skiatest::Reporter* rep // Test that isTextureBacked reports the correct backing type REPORTER_ASSERT(reporter, isGPUBacked == img->isTextureBacked()); -#if SK_SUPPORT_GPU //-------------- // Test asTextureProxyRef - as long as there is a context this should succeed if (context) { sk_sp proxy(img->asTextureProxyRef(context)); REPORTER_ASSERT(reporter, proxy); } -#endif //-------------- // Test getROPixels - this should always succeed regardless of backing store @@ -127,7 +123,6 @@ static void test_image(const sk_sp& img, skiatest::Reporter* rep SkPixmap tmpPixmap; REPORTER_ASSERT(reporter, isGPUBacked != !!tightImg->peekPixels(&tmpPixmap)); } -#if SK_SUPPORT_GPU { SkImageFilter::OutputProperties outProps(img->getColorSpace()); sk_sp tightSurf(img->makeTightSurface(outProps, subset.size())); @@ -140,7 +135,6 @@ static void test_image(const sk_sp& img, skiatest::Reporter* rep SkPixmap tmpPixmap; REPORTER_ASSERT(reporter, isGPUBacked != !!tightSurf->peekPixels(&tmpPixmap)); } -#endif } DEF_TEST(SpecialImage_Raster, reporter) { @@ -196,8 +190,6 @@ DEF_TEST(SpecialImage_Image_ColorSpaceAware, reporter) { test_specialimage_image(reporter, srgbColorSpace.get()); } -#if SK_SUPPORT_GPU - static void test_texture_backed(skiatest::Reporter* reporter, const sk_sp& orig, const sk_sp& gpuBacked) { @@ -341,5 +333,3 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialImage_DeferredGpu, reporter, ctxInfo) test_image(subSImg2, reporter, context, true, kPad, kFullSize); } } - -#endif -- cgit v1.2.3