aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SpecialImageTest.cpp
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-05-31 14:27:17 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-31 18:59:44 +0000
commitc7ad40f76f6f23b3acd73b53e989220fd71f2da2 (patch)
tree3a2372730179f1bd0dd2486b6e576ec308f1327b /tests/SpecialImageTest.cpp
parent8103bb960933359f6536cbfd40d760e54b079e94 (diff)
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 <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tests/SpecialImageTest.cpp')
-rw-r--r--tests/SpecialImageTest.cpp10
1 files changed, 0 insertions, 10 deletions
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<SkSpecialImage>& 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<GrTextureProxy> 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<SkSpecialImage>& img, skiatest::Reporter* rep
SkPixmap tmpPixmap;
REPORTER_ASSERT(reporter, isGPUBacked != !!tightImg->peekPixels(&tmpPixmap));
}
-#if SK_SUPPORT_GPU
{
SkImageFilter::OutputProperties outProps(img->getColorSpace());
sk_sp<SkSurface> tightSurf(img->makeTightSurface(outProps, subset.size()));
@@ -140,7 +135,6 @@ static void test_image(const sk_sp<SkSpecialImage>& 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<SkSpecialImage>& orig,
const sk_sp<SkSpecialImage>& gpuBacked) {
@@ -341,5 +333,3 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialImage_DeferredGpu, reporter, ctxInfo)
test_image(subSImg2, reporter, context, true, kPad, kFullSize);
}
}
-
-#endif