diff options
Diffstat (limited to 'src/gpu')
48 files changed, 111 insertions, 26 deletions
diff --git a/src/gpu/GrDefaultGeoProcFactory.cpp b/src/gpu/GrDefaultGeoProcFactory.cpp index ab57c0b7b5..f371e24b1f 100644 --- a/src/gpu/GrDefaultGeoProcFactory.cpp +++ b/src/gpu/GrDefaultGeoProcFactory.cpp @@ -237,6 +237,7 @@ private: GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DefaultGeoProc); +#if GR_TEST_UTILS sk_sp<GrGeometryProcessor> DefaultGeoProc::TestCreate(GrProcessorTestData* d) { uint32_t flags = 0; if (d->fRandom->nextBool()) { @@ -260,6 +261,7 @@ sk_sp<GrGeometryProcessor> DefaultGeoProc::TestCreate(GrProcessorTestData* d) { d->fRandom->nextBool(), GrRandomCoverage(d->fRandom)); } +#endif sk_sp<GrGeometryProcessor> GrDefaultGeoProcFactory::Make(const Color& color, const Coverage& coverage, diff --git a/src/gpu/GrDrawOpTest.cpp b/src/gpu/GrDrawOpTest.cpp index 3cf1a90b8e..5d0aa56ee9 100644 --- a/src/gpu/GrDrawOpTest.cpp +++ b/src/gpu/GrDrawOpTest.cpp @@ -10,7 +10,7 @@ #include "SkRandom.h" #include "SkTypes.h" -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS #define DRAW_OP_TEST_EXTERN(Op) \ extern std::unique_ptr<GrDrawOp> Op##__Test(SkRandom*, GrContext* context); diff --git a/src/gpu/GrDrawOpTest.h b/src/gpu/GrDrawOpTest.h index 46abf18283..8c98597c3f 100644 --- a/src/gpu/GrDrawOpTest.h +++ b/src/gpu/GrDrawOpTest.h @@ -11,7 +11,7 @@ #include "GrTestUtils.h" #include "SkRefCnt.h" -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS class GrDrawOp; class GrContext; diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp index 56d3e7f1a4..897a755902 100644 --- a/src/gpu/GrProcessor.cpp +++ b/src/gpu/GrProcessor.cpp @@ -17,7 +17,7 @@ #include "SkSpinlock.h" #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS - +#if GR_TEST_UTILS class GrFragmentProcessor; class GrGeometryProcessor; @@ -80,6 +80,7 @@ void GrXPFactoryTestFactory::VerifyFactoryCount() { } #endif +#endif // We use a global pool protected by a mutex(spinlock). Chrome may use the same GrContext on diff --git a/src/gpu/GrProcessorUnitTest.cpp b/src/gpu/GrProcessorUnitTest.cpp index 3f43389fe0..71b112d20f 100644 --- a/src/gpu/GrProcessorUnitTest.cpp +++ b/src/gpu/GrProcessorUnitTest.cpp @@ -8,6 +8,8 @@ #include "GrProcessorUnitTest.h" #include "GrFragmentProcessor.h" +#if GR_TEST_UTILS + sk_sp<GrFragmentProcessor> GrProcessorUnitTest::MakeChildFP(GrProcessorTestData* data) { #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS sk_sp<GrFragmentProcessor> fp; @@ -21,3 +23,4 @@ sk_sp<GrFragmentProcessor> GrProcessorUnitTest::MakeChildFP(GrProcessorTestData* return nullptr; #endif } +#endif diff --git a/src/gpu/GrTestUtils.cpp b/src/gpu/GrTestUtils.cpp index c9cccb8f93..35af494c9b 100644 --- a/src/gpu/GrTestUtils.cpp +++ b/src/gpu/GrTestUtils.cpp @@ -14,7 +14,7 @@ #include "SkPath.h" #include "SkRRect.h" -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS static const SkMatrix& test_matrix(SkRandom* random, bool includeNonPerspective, diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp index aef3c0d1be..ad43eef76d 100644 --- a/src/gpu/SkGr.cpp +++ b/src/gpu/SkGr.cpp @@ -14,6 +14,7 @@ #include "GrGpuResourcePriv.h" #include "GrRenderTargetContext.h" #include "GrTexturePriv.h" +#include "GrTextureProxy.h" #include "GrTypes.h" #include "GrXferProcessor.h" diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp index 834b11dc17..4877072210 100644 --- a/src/gpu/effects/GrBezierEffect.cpp +++ b/src/gpu/effects/GrBezierEffect.cpp @@ -258,6 +258,7 @@ GrConicEffect::GrConicEffect(GrColor color, const SkMatrix& viewMatrix, uint8_t GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrConicEffect); +#if GR_TEST_UTILS sk_sp<GrGeometryProcessor> GrConicEffect::TestCreate(GrProcessorTestData* d) { sk_sp<GrGeometryProcessor> gp; do { @@ -270,6 +271,7 @@ sk_sp<GrGeometryProcessor> GrConicEffect::TestCreate(GrProcessorTestData* d) { } while (nullptr == gp); return gp; } +#endif ////////////////////////////////////////////////////////////////////////////// // Quad @@ -459,6 +461,7 @@ GrQuadEffect::GrQuadEffect(GrColor color, const SkMatrix& viewMatrix, uint8_t co GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrQuadEffect); +#if GR_TEST_UTILS sk_sp<GrGeometryProcessor> GrQuadEffect::TestCreate(GrProcessorTestData* d) { sk_sp<GrGeometryProcessor> gp; do { @@ -470,6 +473,7 @@ sk_sp<GrGeometryProcessor> GrQuadEffect::TestCreate(GrProcessorTestData* d) { } while (nullptr == gp); return gp; } +#endif ////////////////////////////////////////////////////////////////////////////// // Cubic @@ -679,6 +683,7 @@ GrCubicEffect::GrCubicEffect(GrColor color, const SkMatrix& viewMatrix, GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrCubicEffect); +#if GR_TEST_UTILS sk_sp<GrGeometryProcessor> GrCubicEffect::TestCreate(GrProcessorTestData* d) { sk_sp<GrGeometryProcessor> gp; do { @@ -690,3 +695,4 @@ sk_sp<GrGeometryProcessor> GrCubicEffect::TestCreate(GrProcessorTestData* d) { } while (nullptr == gp); return gp; } +#endif diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp index cb589959a2..2499c20cb2 100644 --- a/src/gpu/effects/GrBicubicEffect.cpp +++ b/src/gpu/effects/GrBicubicEffect.cpp @@ -8,6 +8,7 @@ #include "GrBicubicEffect.h" #include "GrInvariantOutput.h" #include "GrProxyMove.h" +#include "GrTextureProxy.h" #include "glsl/GrGLSLColorSpaceXformHelper.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramDataManager.h" @@ -202,6 +203,7 @@ void GrBicubicEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const { GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrBicubicEffect); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> GrBicubicEffect::TestCreate(GrProcessorTestData* d) { int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; @@ -211,6 +213,7 @@ sk_sp<GrFragmentProcessor> GrBicubicEffect::TestCreate(GrProcessorTestData* d) { return GrBicubicEffect::Make(d->context(), d->textureProxy(texIdx), std::move(colorSpaceXform), SkMatrix::I(), kClampClamp); } +#endif ////////////////////////////////////////////////////////////////////////////// diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp index 3c4566ea7c..60df6b90b2 100644 --- a/src/gpu/effects/GrBitmapTextGeoProc.cpp +++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp @@ -154,6 +154,7 @@ GrGLSLPrimitiveProcessor* GrBitmapTextGeoProc::createGLSLInstance(const GrShader GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrBitmapTextGeoProc); +#if GR_TEST_UTILS sk_sp<GrGeometryProcessor> GrBitmapTextGeoProc::TestCreate(GrProcessorTestData* d) { int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; @@ -186,3 +187,4 @@ sk_sp<GrGeometryProcessor> GrBitmapTextGeoProc::TestCreate(GrProcessorTestData* format, GrTest::TestMatrix(d->fRandom), d->fRandom->nextBool()); } +#endif diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp index d9b408a6bb..d9a6fefc1e 100644 --- a/src/gpu/effects/GrConfigConversionEffect.cpp +++ b/src/gpu/effects/GrConfigConversionEffect.cpp @@ -149,6 +149,7 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConfigConversionEffect); #pragma optimize("t", off) #endif +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> GrConfigConversionEffect::TestCreate(GrProcessorTestData* d) { PMConversion pmConv = static_cast<PMConversion>(d->fRandom->nextULessThan(kPMConversionCnt)); GrSwizzle swizzle; @@ -160,6 +161,7 @@ sk_sp<GrFragmentProcessor> GrConfigConversionEffect::TestCreate(GrProcessorTestD d->textureProxy(GrProcessorUnitTest::kSkiaPMTextureIdx), swizzle, pmConv, GrTest::TestMatrix(d->fRandom))); } +#endif #if !defined(__clang__) && _MSC_FULL_VER >= 190024213 // Restore optimization settings. diff --git a/src/gpu/effects/GrConstColorProcessor.cpp b/src/gpu/effects/GrConstColorProcessor.cpp index 3875ffcaa0..1d20512a63 100644 --- a/src/gpu/effects/GrConstColorProcessor.cpp +++ b/src/gpu/effects/GrConstColorProcessor.cpp @@ -116,6 +116,7 @@ bool GrConstColorProcessor::onIsEqual(const GrFragmentProcessor& other) const { GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConstColorProcessor); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> GrConstColorProcessor::TestCreate(GrProcessorTestData* d) { GrColor4f color; int colorPicker = d->fRandom->nextULessThan(3); @@ -139,3 +140,4 @@ sk_sp<GrFragmentProcessor> GrConstColorProcessor::TestCreate(GrProcessorTestData InputMode mode = static_cast<InputMode>(d->fRandom->nextULessThan(kInputModeCnt)); return GrConstColorProcessor::Make(color, mode); } +#endif diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp index 4100a0fce2..db8c2d999e 100644 --- a/src/gpu/effects/GrConvexPolyEffect.cpp +++ b/src/gpu/effects/GrConvexPolyEffect.cpp @@ -63,6 +63,7 @@ private: GR_DEFINE_FRAGMENT_PROCESSOR_TEST(AARectEffect); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> AARectEffect::TestCreate(GrProcessorTestData* d) { SkRect rect = SkRect::MakeLTRB(d->fRandom->nextSScalar1(), d->fRandom->nextSScalar1(), @@ -77,6 +78,7 @@ sk_sp<GrFragmentProcessor> AARectEffect::TestCreate(GrProcessorTestData* d) { } while (nullptr == fp); return fp; } +#endif ////////////////////////////////////////////////////////////////////////////// @@ -362,6 +364,7 @@ bool GrConvexPolyEffect::onIsEqual(const GrFragmentProcessor& other) const { GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConvexPolyEffect); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> GrConvexPolyEffect::TestCreate(GrProcessorTestData* d) { int count = d->fRandom->nextULessThan(kMaxEdges) + 1; SkScalar edges[kMaxEdges * 3]; @@ -377,3 +380,4 @@ sk_sp<GrFragmentProcessor> GrConvexPolyEffect::TestCreate(GrProcessorTestData* d } while (nullptr == fp); return fp; } +#endif diff --git a/src/gpu/effects/GrCoverageSetOpXP.cpp b/src/gpu/effects/GrCoverageSetOpXP.cpp index 05e9fadf9b..b8902de58c 100644 --- a/src/gpu/effects/GrCoverageSetOpXP.cpp +++ b/src/gpu/effects/GrCoverageSetOpXP.cpp @@ -347,8 +347,10 @@ void GrCoverageSetOpXPFactory::getInvariantBlendedColor(const GrProcOptInfo& col GR_DEFINE_XP_FACTORY_TEST(GrCoverageSetOpXPFactory); +#if GR_TEST_UTILS const GrXPFactory* GrCoverageSetOpXPFactory::TestGet(GrProcessorTestData* d) { SkRegion::Op regionOp = SkRegion::Op(d->fRandom->nextULessThan(SkRegion::kLastOp + 1)); bool invertCoverage = !d->fRenderTargetContext->hasMixedSamples() && d->fRandom->nextBool(); return GrCoverageSetOpXPFactory::Get(regionOp, invertCoverage); } +#endif diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp index f8af7db8a0..4c33b9b9ec 100644 --- a/src/gpu/effects/GrCustomXfermode.cpp +++ b/src/gpu/effects/GrCustomXfermode.cpp @@ -382,12 +382,14 @@ void CustomXPFactory::getInvariantBlendedColor(const GrProcOptInfo& colorPOI, } GR_DEFINE_XP_FACTORY_TEST(CustomXPFactory); +#if GR_TEST_UTILS const GrXPFactory* CustomXPFactory::TestGet(GrProcessorTestData* d) { int mode = d->fRandom->nextRangeU((int)SkBlendMode::kLastCoeffMode + 1, (int)SkBlendMode::kLastSeparableMode); return GrCustomXfermode::Get((SkBlendMode)mode); } +#endif /////////////////////////////////////////////////////////////////////////////// diff --git a/src/gpu/effects/GrDisableColorXP.cpp b/src/gpu/effects/GrDisableColorXP.cpp index 69c34ecc66..7323331a67 100644 --- a/src/gpu/effects/GrDisableColorXP.cpp +++ b/src/gpu/effects/GrDisableColorXP.cpp @@ -98,6 +98,8 @@ GrXferProcessor* GrDisableColorXPFactory::onCreateXferProcessor(const GrCaps& ca GR_DEFINE_XP_FACTORY_TEST(GrDisableColorXPFactory); +#if GR_TEST_UTILS const GrXPFactory* GrDisableColorXPFactory::TestGet(GrProcessorTestData*) { return GrDisableColorXPFactory::Get(); } +#endif diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp index ee28760b11..0f9625e8a0 100644 --- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp +++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp @@ -265,6 +265,7 @@ GrDistanceFieldA8TextGeoProc::createGLSLInstance(const GrShaderCaps&) const { GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrDistanceFieldA8TextGeoProc); +#if GR_TEST_UTILS sk_sp<GrGeometryProcessor> GrDistanceFieldA8TextGeoProc::TestCreate(GrProcessorTestData* d) { int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; @@ -295,6 +296,7 @@ sk_sp<GrGeometryProcessor> GrDistanceFieldA8TextGeoProc::TestCreate(GrProcessorT flags, d->fRandom->nextBool()); } +#endif /////////////////////////////////////////////////////////////////////////////// @@ -503,6 +505,7 @@ GrDistanceFieldPathGeoProc::createGLSLInstance(const GrShaderCaps&) const { GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrDistanceFieldPathGeoProc); +#if GR_TEST_UTILS sk_sp<GrGeometryProcessor> GrDistanceFieldPathGeoProc::TestCreate(GrProcessorTestData* d) { int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; @@ -531,6 +534,7 @@ sk_sp<GrGeometryProcessor> GrDistanceFieldPathGeoProc::TestCreate(GrProcessorTes flags, d->fRandom->nextBool()); } +#endif /////////////////////////////////////////////////////////////////////////////// @@ -801,6 +805,7 @@ GrGLSLPrimitiveProcessor* GrDistanceFieldLCDTextGeoProc::createGLSLInstance(cons GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrDistanceFieldLCDTextGeoProc); +#if GR_TEST_UTILS sk_sp<GrGeometryProcessor> GrDistanceFieldLCDTextGeoProc::TestCreate(GrProcessorTestData* d) { int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; @@ -829,3 +834,4 @@ sk_sp<GrGeometryProcessor> GrDistanceFieldLCDTextGeoProc::TestCreate(GrProcessor flags, d->fRandom->nextBool()); } +#endif diff --git a/src/gpu/effects/GrDitherEffect.cpp b/src/gpu/effects/GrDitherEffect.cpp index 24e3ba6d50..34a15651d2 100644 --- a/src/gpu/effects/GrDitherEffect.cpp +++ b/src/gpu/effects/GrDitherEffect.cpp @@ -50,9 +50,11 @@ void DitherEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const { GR_DEFINE_FRAGMENT_PROCESSOR_TEST(DitherEffect); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> DitherEffect::TestCreate(GrProcessorTestData*) { return DitherEffect::Make(); } +#endif ////////////////////////////////////////////////////////////////////////////// diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp index 66aba13438..2d485e634e 100644 --- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp +++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp @@ -7,6 +7,7 @@ #include "GrGaussianConvolutionFragmentProcessor.h" #include "GrProxyMove.h" +#include "GrTextureProxy.h" #include "../private/GrGLSL.h" #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" @@ -229,6 +230,7 @@ bool GrGaussianConvolutionFragmentProcessor::onIsEqual(const GrFragmentProcessor GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrGaussianConvolutionFragmentProcessor); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> GrGaussianConvolutionFragmentProcessor::TestCreate( GrProcessorTestData* d) { int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx @@ -255,3 +257,4 @@ sk_sp<GrFragmentProcessor> GrGaussianConvolutionFragmentProcessor::TestCreate( return GrGaussianConvolutionFragmentProcessor::Make( d->context(), d->textureProxy(texIdx), dir, radius, sigma, useBounds, bounds); } +#endif diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp index 86fd565877..1a40514c83 100644 --- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp +++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp @@ -5,6 +5,7 @@ * found in the LICENSE file. */ #include "GrMatrixConvolutionEffect.h" +#include "GrTextureProxy.h" #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramDataManager.h" @@ -290,6 +291,7 @@ sk_sp<GrFragmentProcessor> GrMatrixConvolutionEffect::MakeGaussian(GrContext* co GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMatrixConvolutionEffect); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> GrMatrixConvolutionEffect::TestCreate(GrProcessorTestData* d) { int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; @@ -322,3 +324,4 @@ sk_sp<GrFragmentProcessor> GrMatrixConvolutionEffect::TestCreate(GrProcessorTest tileMode, convolveAlpha); } +#endif diff --git a/src/gpu/effects/GrOvalEffect.cpp b/src/gpu/effects/GrOvalEffect.cpp index 3b0a8871c4..b64ac56859 100644 --- a/src/gpu/effects/GrOvalEffect.cpp +++ b/src/gpu/effects/GrOvalEffect.cpp @@ -77,6 +77,7 @@ bool CircleEffect::onIsEqual(const GrFragmentProcessor& other) const { GR_DEFINE_FRAGMENT_PROCESSOR_TEST(CircleEffect); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> CircleEffect::TestCreate(GrProcessorTestData* d) { SkPoint center; center.fX = d->fRandom->nextRangeScalar(0.f, 1000.f); @@ -88,6 +89,7 @@ sk_sp<GrFragmentProcessor> CircleEffect::TestCreate(GrProcessorTestData* d) { } while (kHairlineAA_GrProcessorEdgeType == et); return CircleEffect::Make(et, center, radius); } +#endif ////////////////////////////////////////////////////////////////////////////// @@ -246,6 +248,7 @@ bool EllipseEffect::onIsEqual(const GrFragmentProcessor& other) const { GR_DEFINE_FRAGMENT_PROCESSOR_TEST(EllipseEffect); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> EllipseEffect::TestCreate(GrProcessorTestData* d) { SkPoint center; center.fX = d->fRandom->nextRangeScalar(0.f, 1000.f); @@ -258,6 +261,7 @@ sk_sp<GrFragmentProcessor> EllipseEffect::TestCreate(GrProcessorTestData* d) { } while (kHairlineAA_GrProcessorEdgeType == et); return EllipseEffect::Make(et, center, rx, ry); } +#endif ////////////////////////////////////////////////////////////////////////////// diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp index 59710ebfc0..8289561b1e 100644 --- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp +++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp @@ -830,10 +830,12 @@ bool GrPorterDuffXPFactory::willReadDstColor(const GrCaps& caps, ColorType color GR_DEFINE_XP_FACTORY_TEST(GrPorterDuffXPFactory); +#if GR_TEST_UTILS const GrXPFactory* GrPorterDuffXPFactory::TestGet(GrProcessorTestData* d) { SkBlendMode mode = SkBlendMode(d->fRandom->nextULessThan((int)SkBlendMode::kLastCoeffMode)); return GrPorterDuffXPFactory::Get(mode); } +#endif void GrPorterDuffXPFactory::TestGetXPOutputTypes(const GrXferProcessor* xp, int* outPrimary, @@ -847,7 +849,6 @@ void GrPorterDuffXPFactory::TestGetXPOutputTypes(const GrXferProcessor* xp, *outSecondary = blendFormula.fSecondaryOutputType; } - //////////////////////////////////////////////////////////////////////////////////////////////// // SrcOver Global functions //////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/gpu/effects/GrRRectEffect.cpp b/src/gpu/effects/GrRRectEffect.cpp index 4397fcf930..dabf11ae8d 100644 --- a/src/gpu/effects/GrRRectEffect.cpp +++ b/src/gpu/effects/GrRRectEffect.cpp @@ -112,6 +112,7 @@ bool CircularRRectEffect::onIsEqual(const GrFragmentProcessor& other) const { GR_DEFINE_FRAGMENT_PROCESSOR_TEST(CircularRRectEffect); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> CircularRRectEffect::TestCreate(GrProcessorTestData* d) { SkScalar w = d->fRandom->nextRangeScalar(20.f, 1000.f); SkScalar h = d->fRandom->nextRangeScalar(20.f, 1000.f); @@ -126,6 +127,7 @@ sk_sp<GrFragmentProcessor> CircularRRectEffect::TestCreate(GrProcessorTestData* } while (nullptr == fp); return fp; } +#endif ////////////////////////////////////////////////////////////////////////////// @@ -445,6 +447,7 @@ bool EllipticalRRectEffect::onIsEqual(const GrFragmentProcessor& other) const { GR_DEFINE_FRAGMENT_PROCESSOR_TEST(EllipticalRRectEffect); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> EllipticalRRectEffect::TestCreate(GrProcessorTestData* d) { SkScalar w = d->fRandom->nextRangeScalar(20.f, 1000.f); SkScalar h = d->fRandom->nextRangeScalar(20.f, 1000.f); @@ -480,6 +483,7 @@ sk_sp<GrFragmentProcessor> EllipticalRRectEffect::TestCreate(GrProcessorTestData } while (nullptr == fp); return fp; } +#endif ////////////////////////////////////////////////////////////////////////////// diff --git a/src/gpu/effects/GrSRGBEffect.cpp b/src/gpu/effects/GrSRGBEffect.cpp index 9279586584..ad90e70936 100644 --- a/src/gpu/effects/GrSRGBEffect.cpp +++ b/src/gpu/effects/GrSRGBEffect.cpp @@ -110,10 +110,12 @@ GrColor4f GrSRGBEffect::constantOutputForConstantInput(GrColor4f input) const { GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSRGBEffect); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> GrSRGBEffect::TestCreate(GrProcessorTestData* d) { Mode testMode = static_cast<Mode>(d->fRandom->nextRangeU(0, 1)); return sk_sp<GrFragmentProcessor>(new GrSRGBEffect(testMode)); } +#endif /////////////////////////////////////////////////////////////////////////////// diff --git a/src/gpu/effects/GrShadowGeoProc.cpp b/src/gpu/effects/GrShadowGeoProc.cpp index cb4c834aea..e11a672dba 100755 --- a/src/gpu/effects/GrShadowGeoProc.cpp +++ b/src/gpu/effects/GrShadowGeoProc.cpp @@ -99,6 +99,8 @@ GrGLSLPrimitiveProcessor* GrRRectShadowGeoProc::createGLSLInstance(const GrShade GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrRRectShadowGeoProc); +#if GR_TEST_UTILS sk_sp<GrGeometryProcessor> GrRRectShadowGeoProc::TestCreate(GrProcessorTestData* d) { return GrRRectShadowGeoProc::Make(GrTest::TestMatrix(d->fRandom)); } +#endif diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp index 3dc6ea3a2c..8b63fec907 100644 --- a/src/gpu/effects/GrSimpleTextureEffect.cpp +++ b/src/gpu/effects/GrSimpleTextureEffect.cpp @@ -96,6 +96,7 @@ GrGLSLFragmentProcessor* GrSimpleTextureEffect::onCreateGLSLInstance() const { GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSimpleTextureEffect); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> GrSimpleTextureEffect::TestCreate(GrProcessorTestData* d) { int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; @@ -116,3 +117,4 @@ sk_sp<GrFragmentProcessor> GrSimpleTextureEffect::TestCreate(GrProcessorTestData return GrSimpleTextureEffect::Make(d->context(), d->textureProxy(texIdx), std::move(colorSpaceXform), matrix); } +#endif diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp index f27b776f3c..58707f5744 100644 --- a/src/gpu/effects/GrTextureDomain.cpp +++ b/src/gpu/effects/GrTextureDomain.cpp @@ -375,6 +375,7 @@ void GrTextureDomainEffect::onComputeInvariantOutput(GrInvariantOutput* inout) c GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrTextureDomainEffect); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> GrTextureDomainEffect::TestCreate(GrProcessorTestData* d) { int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; @@ -398,6 +399,7 @@ sk_sp<GrFragmentProcessor> GrTextureDomainEffect::TestCreate(GrProcessorTestData bilerp ? GrSamplerParams::kBilerp_FilterMode : GrSamplerParams::kNone_FilterMode); } +#endif /////////////////////////////////////////////////////////////////////////////// @@ -515,6 +517,7 @@ void GrDeviceSpaceTextureDecalFragmentProcessor::onComputeInvariantOutput( GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrDeviceSpaceTextureDecalFragmentProcessor); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> GrDeviceSpaceTextureDecalFragmentProcessor::TestCreate( GrProcessorTestData* d) { int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx @@ -531,3 +534,4 @@ sk_sp<GrFragmentProcessor> GrDeviceSpaceTextureDecalFragmentProcessor::TestCreat return GrDeviceSpaceTextureDecalFragmentProcessor::Make(d->context(), std::move(proxy), subset, pt); } +#endif diff --git a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp index af32adec8b..0ecb4bd3c0 100644 --- a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp +++ b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp @@ -90,6 +90,7 @@ private: GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ComposeTwoFragmentProcessor); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> ComposeTwoFragmentProcessor::TestCreate(GrProcessorTestData* d) { // Create two random frag procs. sk_sp<GrFragmentProcessor> fpA(GrProcessorUnitTest::MakeChildFP(d)); @@ -100,6 +101,7 @@ sk_sp<GrFragmentProcessor> ComposeTwoFragmentProcessor::TestCreate(GrProcessorTe return sk_sp<GrFragmentProcessor>( new ComposeTwoFragmentProcessor(std::move(fpA), std::move(fpB), mode)); } +#endif GrGLSLFragmentProcessor* ComposeTwoFragmentProcessor::onCreateGLSLInstance() const{ return new GLComposeTwoFragmentProcessor; @@ -295,6 +297,7 @@ private: GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ComposeOneFragmentProcessor); +#if GR_TEST_UTILS sk_sp<GrFragmentProcessor> ComposeOneFragmentProcessor::TestCreate(GrProcessorTestData* d) { // Create one random frag procs. // For now, we'll prevent either children from being a shader with children to prevent the @@ -307,6 +310,7 @@ sk_sp<GrFragmentProcessor> ComposeOneFragmentProcessor::TestCreate(GrProcessorTe ComposeOneFragmentProcessor::kSrc_Child; return sk_sp<GrFragmentProcessor>(new ComposeOneFragmentProcessor(std::move(dst), mode, child)); } +#endif GrGLSLFragmentProcessor* ComposeOneFragmentProcessor::onCreateGLSLInstance() const { return new GLComposeOneFragmentProcessor; diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp index f39902fd2c..767b7a01f9 100644 --- a/src/gpu/ops/GrAAConvexPathRenderer.cpp +++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp @@ -654,6 +654,7 @@ private: GR_DEFINE_GEOMETRY_PROCESSOR_TEST(QuadEdgeEffect); +#if GR_TEST_UTILS sk_sp<GrGeometryProcessor> QuadEdgeEffect::TestCreate(GrProcessorTestData* d) { // Doesn't work without derivative instructions. return d->fContext->caps()->shaderCaps()->shaderDerivativeSupport() @@ -662,6 +663,7 @@ sk_sp<GrGeometryProcessor> QuadEdgeEffect::TestCreate(GrProcessorTestData* d) { d->fRandom->nextBool()) : nullptr; } +#endif /////////////////////////////////////////////////////////////////////////////// @@ -985,7 +987,7 @@ bool GrAAConvexPathRenderer::onDrawPath(const DrawPathArgs& args) { /////////////////////////////////////////////////////////////////////////////////////////////////// -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS DRAW_OP_TEST_DEFINE(AAConvexPathOp) { GrColor color = GrRandomColor(random); diff --git a/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp b/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp index 891eab3e00..f817f86357 100644 --- a/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp +++ b/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp @@ -551,7 +551,7 @@ bool GrAADistanceFieldPathRenderer::onDrawPath(const DrawPathArgs& args) { /////////////////////////////////////////////////////////////////////////////////////////////////// -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS struct PathTestStruct { typedef GrAADistanceFieldPathRenderer::ShapeCache ShapeCache; diff --git a/src/gpu/ops/GrAAFillRectOp.cpp b/src/gpu/ops/GrAAFillRectOp.cpp index a0fc9f028f..13aaae44de 100644 --- a/src/gpu/ops/GrAAFillRectOp.cpp +++ b/src/gpu/ops/GrAAFillRectOp.cpp @@ -383,7 +383,7 @@ std::unique_ptr<GrDrawOp> MakeWithLocalRect(GrColor color, /////////////////////////////////////////////////////////////////////////////////////////////////// -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS #include "GrDrawOpTest.h" diff --git a/src/gpu/ops/GrAAHairLinePathRenderer.cpp b/src/gpu/ops/GrAAHairLinePathRenderer.cpp index 958eb579ea..f17b21876c 100644 --- a/src/gpu/ops/GrAAHairLinePathRenderer.cpp +++ b/src/gpu/ops/GrAAHairLinePathRenderer.cpp @@ -962,7 +962,7 @@ bool GrAAHairLinePathRenderer::onDrawPath(const DrawPathArgs& args) { /////////////////////////////////////////////////////////////////////////////////////////////////// -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS DRAW_OP_TEST_DEFINE(AAHairlineOp) { GrColor color = GrRandomColor(random); diff --git a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp index fd09d91599..fdb5d7f7d7 100644 --- a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp +++ b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp @@ -350,7 +350,7 @@ bool GrAALinearizingConvexPathRenderer::onDrawPath(const DrawPathArgs& args) { /////////////////////////////////////////////////////////////////////////////////////////////////// -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS DRAW_OP_TEST_DEFINE(AAFlatteningConvexPathOp) { GrColor color = GrRandomColor(random); diff --git a/src/gpu/ops/GrAAStrokeRectOp.cpp b/src/gpu/ops/GrAAStrokeRectOp.cpp index b05e72216e..c30be77923 100644 --- a/src/gpu/ops/GrAAStrokeRectOp.cpp +++ b/src/gpu/ops/GrAAStrokeRectOp.cpp @@ -11,6 +11,7 @@ #include "GrOpFlushState.h" #include "GrResourceKey.h" #include "GrResourceProvider.h" +#include "SkStrokeRec.h" GR_DECLARE_STATIC_UNIQUE_KEY(gMiterIndexBufferKey); GR_DECLARE_STATIC_UNIQUE_KEY(gBevelIndexBufferKey); @@ -578,7 +579,7 @@ std::unique_ptr<GrDrawOp> Make(GrColor color, /////////////////////////////////////////////////////////////////////////////////////////////////// -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS #include "GrDrawOpTest.h" diff --git a/src/gpu/ops/GrAnalyticRectOp.cpp b/src/gpu/ops/GrAnalyticRectOp.cpp index 52934ff9c7..df62e05b30 100644 --- a/src/gpu/ops/GrAnalyticRectOp.cpp +++ b/src/gpu/ops/GrAnalyticRectOp.cpp @@ -223,9 +223,11 @@ private: GR_DEFINE_GEOMETRY_PROCESSOR_TEST(RectGeometryProcessor); +#if GR_TEST_UTILS sk_sp<GrGeometryProcessor> RectGeometryProcessor::TestCreate(GrProcessorTestData* d) { return sk_sp<GrGeometryProcessor>(new RectGeometryProcessor(GrTest::TestMatrix(d->fRandom))); } +#endif /////////////////////////////////////////////////////////////////////////////// @@ -385,7 +387,7 @@ std::unique_ptr<GrDrawOp> GrAnalyticRectOp::Make(GrColor color, new AnalyticRectOp(color, viewMatrix, rect, croppedRect, bounds)); } -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS DRAW_OP_TEST_DEFINE(AnalyticRectOp) { SkMatrix viewMatrix = GrTest::TestMatrix(random); diff --git a/src/gpu/ops/GrDashOp.cpp b/src/gpu/ops/GrDashOp.cpp index d4be853100..7d7dbf1564 100644 --- a/src/gpu/ops/GrDashOp.cpp +++ b/src/gpu/ops/GrDashOp.cpp @@ -936,12 +936,14 @@ DashingCircleEffect::DashingCircleEffect(GrColor color, GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DashingCircleEffect); +#if GR_TEST_UTILS sk_sp<GrGeometryProcessor> DashingCircleEffect::TestCreate(GrProcessorTestData* d) { AAMode aaMode = static_cast<AAMode>(d->fRandom->nextULessThan(GrDashOp::kAAModeCnt)); return DashingCircleEffect::Make(GrRandomColor(d->fRandom), aaMode, GrTest::TestMatrix(d->fRandom), d->fRandom->nextBool()); } +#endif ////////////////////////////////////////////////////////////////////////////// @@ -1156,12 +1158,14 @@ DashingLineEffect::DashingLineEffect(GrColor color, GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DashingLineEffect); +#if GR_TEST_UTILS sk_sp<GrGeometryProcessor> DashingLineEffect::TestCreate(GrProcessorTestData* d) { AAMode aaMode = static_cast<AAMode>(d->fRandom->nextULessThan(GrDashOp::kAAModeCnt)); return DashingLineEffect::Make(GrRandomColor(d->fRandom), aaMode, GrTest::TestMatrix(d->fRandom), d->fRandom->nextBool()); } +#endif ////////////////////////////////////////////////////////////////////////////// @@ -1187,7 +1191,7 @@ static sk_sp<GrGeometryProcessor> make_dash_gp(GrColor color, ///////////////////////////////////////////////////////////////////////////////////////////////// -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS DRAW_OP_TEST_DEFINE(DashOp) { GrColor color = GrRandomColor(random); diff --git a/src/gpu/ops/GrDefaultPathRenderer.cpp b/src/gpu/ops/GrDefaultPathRenderer.cpp index e76ded3d5a..5ac71d8807 100644 --- a/src/gpu/ops/GrDefaultPathRenderer.cpp +++ b/src/gpu/ops/GrDefaultPathRenderer.cpp @@ -607,7 +607,7 @@ void GrDefaultPathRenderer::onStencilPath(const StencilPathArgs& args) { /////////////////////////////////////////////////////////////////////////////////////////////////// -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS DRAW_OP_TEST_DEFINE(DefaultPathOp) { GrColor color = GrRandomColor(random); diff --git a/src/gpu/ops/GrDrawAtlasOp.cpp b/src/gpu/ops/GrDrawAtlasOp.cpp index 4d78a7dc6d..7ef7e06317 100644 --- a/src/gpu/ops/GrDrawAtlasOp.cpp +++ b/src/gpu/ops/GrDrawAtlasOp.cpp @@ -179,7 +179,7 @@ bool GrDrawAtlasOp::onCombineIfPossible(GrOp* t, const GrCaps& caps) { return true; } -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS static SkRSXform random_xform(SkRandom* random) { static const SkScalar kMinExtent = -100.f; diff --git a/src/gpu/ops/GrDrawVerticesOp.cpp b/src/gpu/ops/GrDrawVerticesOp.cpp index 3448249096..2b63804ee7 100644 --- a/src/gpu/ops/GrDrawVerticesOp.cpp +++ b/src/gpu/ops/GrDrawVerticesOp.cpp @@ -221,7 +221,7 @@ bool GrDrawVerticesOp::onCombineIfPossible(GrOp* t, const GrCaps& caps) { /////////////////////////////////////////////////////////////////////////////////////////////////// -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS #include "GrDrawOpTest.h" diff --git a/src/gpu/ops/GrNonAAFillRectOp.cpp b/src/gpu/ops/GrNonAAFillRectOp.cpp index 7ef6cad0be..5688c9bb11 100644 --- a/src/gpu/ops/GrNonAAFillRectOp.cpp +++ b/src/gpu/ops/GrNonAAFillRectOp.cpp @@ -188,7 +188,7 @@ std::unique_ptr<GrDrawOp> Make(GrColor color, /////////////////////////////////////////////////////////////////////////////////////////////////// -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS #include "GrDrawOpTest.h" diff --git a/src/gpu/ops/GrNonAAFillRectPerspectiveOp.cpp b/src/gpu/ops/GrNonAAFillRectPerspectiveOp.cpp index cec1cfc286..cf657f0006 100644 --- a/src/gpu/ops/GrNonAAFillRectPerspectiveOp.cpp +++ b/src/gpu/ops/GrNonAAFillRectPerspectiveOp.cpp @@ -232,7 +232,7 @@ std::unique_ptr<GrDrawOp> MakeWithPerspective(GrColor color, /////////////////////////////////////////////////////////////////////////////////////////////////// -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS #include "GrDrawOpTest.h" diff --git a/src/gpu/ops/GrNonAAStrokeRectOp.cpp b/src/gpu/ops/GrNonAAStrokeRectOp.cpp index 417d76e357..53b359e5e0 100644 --- a/src/gpu/ops/GrNonAAStrokeRectOp.cpp +++ b/src/gpu/ops/GrNonAAStrokeRectOp.cpp @@ -12,6 +12,7 @@ #include "GrDrawOpTest.h" #include "GrMeshDrawOp.h" #include "GrOpFlushState.h" +#include "SkStrokeRec.h" #include "SkRandom.h" /* create a triangle strip that strokes the specified rect. There are 8 @@ -193,7 +194,7 @@ std::unique_ptr<GrDrawOp> Make(GrColor color, } } -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS DRAW_OP_TEST_DEFINE(NonAAStrokeRectOp) { SkMatrix viewMatrix = GrTest::TestMatrix(random); diff --git a/src/gpu/ops/GrOvalOpFactory.cpp b/src/gpu/ops/GrOvalOpFactory.cpp index f693169b47..2f50bb49bb 100644 --- a/src/gpu/ops/GrOvalOpFactory.cpp +++ b/src/gpu/ops/GrOvalOpFactory.cpp @@ -246,11 +246,13 @@ private: GR_DEFINE_GEOMETRY_PROCESSOR_TEST(CircleGeometryProcessor); +#if GR_TEST_UTILS sk_sp<GrGeometryProcessor> CircleGeometryProcessor::TestCreate(GrProcessorTestData* d) { return sk_sp<GrGeometryProcessor>(new CircleGeometryProcessor( d->fRandom->nextBool(), d->fRandom->nextBool(), d->fRandom->nextBool(), d->fRandom->nextBool(), GrTest::TestMatrix(d->fRandom))); } +#endif /////////////////////////////////////////////////////////////////////////////// @@ -382,10 +384,12 @@ private: GR_DEFINE_GEOMETRY_PROCESSOR_TEST(EllipseGeometryProcessor); +#if GR_TEST_UTILS sk_sp<GrGeometryProcessor> EllipseGeometryProcessor::TestCreate(GrProcessorTestData* d) { return sk_sp<GrGeometryProcessor>( new EllipseGeometryProcessor(d->fRandom->nextBool(), GrTest::TestMatrix(d->fRandom))); } +#endif /////////////////////////////////////////////////////////////////////////////// @@ -548,10 +552,12 @@ private: GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DIEllipseGeometryProcessor); +#if GR_TEST_UTILS sk_sp<GrGeometryProcessor> DIEllipseGeometryProcessor::TestCreate(GrProcessorTestData* d) { return sk_sp<GrGeometryProcessor>(new DIEllipseGeometryProcessor( GrTest::TestMatrix(d->fRandom), (DIEllipseStyle)(d->fRandom->nextRangeU(0, 2)))); } +#endif /////////////////////////////////////////////////////////////////////////////// @@ -2402,7 +2408,7 @@ std::unique_ptr<GrDrawOp> GrOvalOpFactory::MakeArcOp(GrColor color, const SkMatr /////////////////////////////////////////////////////////////////////////////// -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS DRAW_OP_TEST_DEFINE(CircleOp) { do { diff --git a/src/gpu/ops/GrPLSPathRenderer.cpp b/src/gpu/ops/GrPLSPathRenderer.cpp index 384733f206..80a4cda688 100644 --- a/src/gpu/ops/GrPLSPathRenderer.cpp +++ b/src/gpu/ops/GrPLSPathRenderer.cpp @@ -934,7 +934,7 @@ bool GrPLSPathRenderer::onDrawPath(const DrawPathArgs& args) { /////////////////////////////////////////////////////////////////////////////////////////////////// -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS DRAW_OP_TEST_DEFINE(PLSPathOp) { GrColor color = GrRandomColor(random); diff --git a/src/gpu/ops/GrShadowRRectOp.cpp b/src/gpu/ops/GrShadowRRectOp.cpp index 1882aad47d..e0eadd85c7 100755 --- a/src/gpu/ops/GrShadowRRectOp.cpp +++ b/src/gpu/ops/GrShadowRRectOp.cpp @@ -923,7 +923,7 @@ std::unique_ptr<GrDrawOp> Make(GrColor color, } /////////////////////////////////////////////////////////////////////////////// -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS DRAW_OP_TEST_DEFINE(ShadowCircleOp) { do { diff --git a/src/gpu/ops/GrTessellatingPathRenderer.cpp b/src/gpu/ops/GrTessellatingPathRenderer.cpp index 509ac9fb8b..dd0d3a0fd5 100644 --- a/src/gpu/ops/GrTessellatingPathRenderer.cpp +++ b/src/gpu/ops/GrTessellatingPathRenderer.cpp @@ -367,7 +367,7 @@ bool GrTessellatingPathRenderer::onDrawPath(const DrawPathArgs& args) { /////////////////////////////////////////////////////////////////////////////////////////////////// -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS DRAW_OP_TEST_DEFINE(TesselatingPathOp) { GrColor color = GrRandomColor(random); diff --git a/src/gpu/text/GrAtlasTextContext.cpp b/src/gpu/text/GrAtlasTextContext.cpp index 07a653cdae..e1dc7e2dbd 100644 --- a/src/gpu/text/GrAtlasTextContext.cpp +++ b/src/gpu/text/GrAtlasTextContext.cpp @@ -337,7 +337,7 @@ void GrAtlasTextContext::drawPosText(GrContext* context, GrRenderTargetContext* /////////////////////////////////////////////////////////////////////////////////////////////////// -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS DRAW_OP_TEST_DEFINE(TextBlobOp) { static uint32_t gContextID = SK_InvalidGenID; diff --git a/src/gpu/text/GrAtlasTextContext.h b/src/gpu/text/GrAtlasTextContext.h index 11e22d3b7a..20a736876b 100644 --- a/src/gpu/text/GrAtlasTextContext.h +++ b/src/gpu/text/GrAtlasTextContext.h @@ -14,7 +14,7 @@ #include "GrTextUtils.h" #include "SkTextBlobRunIterator.h" -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS #include "GrDrawOpTest.h" #endif @@ -86,7 +86,7 @@ private: sk_sp<const GrDistanceFieldAdjustTable> fDistanceAdjustTable; -#ifdef GR_TEST_UTILS +#if GR_TEST_UTILS static const uint32_t kTextBlobOpScalerContextFlags = SkPaint::kFakeGammaAndBoostContrast_ScalerContextFlags; DRAW_OP_TEST_FRIEND(TextBlobOp); |