From 26900788ef64db9bd53ea44827d820488842f07d Mon Sep 17 00:00:00 2001 From: John Stiles Date: Tue, 11 Aug 2020 23:17:35 -0400 Subject: [PATCH] Guard dumpInfo() calls with GR_TEST_UTILS, instead of SK_DEBUG. (One exception: the `dumpInfo` in GrVkCommandPool is wrapped with SK_TRACE_MANAGED_RESOURCES to match its peers in GrVkManagedResource.) Change-Id: I6cf55fa2bb5687f79a2cc0c2a9c02a629bfd4f8e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309556 Commit-Queue: John Stiles Auto-Submit: John Stiles Reviewed-by: Brian Salomon --- src/gpu/GrFragmentProcessor.cpp | 2 +- src/gpu/GrFragmentProcessor.h | 2 +- src/gpu/GrProcessor.h | 2 +- src/gpu/GrProcessorSet.cpp | 2 +- src/gpu/GrProcessorSet.h | 2 +- src/gpu/effects/GrBlendFragmentProcessor.cpp | 2 +- .../effects/GrGaussianConvolutionFragmentProcessor.h | 2 +- src/gpu/effects/GrYUVtoRGBEffect.cpp | 2 +- src/gpu/effects/GrYUVtoRGBEffect.h | 2 +- src/gpu/ops/GrAAConvexPathRenderer.cpp | 2 +- src/gpu/ops/GrAAHairLinePathRenderer.cpp | 2 +- src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp | 2 +- src/gpu/ops/GrAtlasTextOp.cpp | 2 +- src/gpu/ops/GrAtlasTextOp.h | 2 +- src/gpu/ops/GrClearOp.h | 2 +- src/gpu/ops/GrDashOp.cpp | 2 +- src/gpu/ops/GrDefaultPathRenderer.cpp | 2 +- src/gpu/ops/GrDrawAtlasOp.cpp | 4 ++-- src/gpu/ops/GrDrawPathOp.cpp | 2 +- src/gpu/ops/GrDrawPathOp.h | 2 +- src/gpu/ops/GrDrawVerticesOp.cpp | 4 ++-- src/gpu/ops/GrDrawableOp.h | 2 +- src/gpu/ops/GrFillRectOp.cpp | 4 ++-- src/gpu/ops/GrLatticeOp.cpp | 2 +- src/gpu/ops/GrOp.h | 2 +- src/gpu/ops/GrOvalOpFactory.cpp | 12 ++++++------ src/gpu/ops/GrRegionOp.cpp | 2 +- src/gpu/ops/GrShadowRRectOp.cpp | 2 +- src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp | 2 +- src/gpu/ops/GrSimpleMeshDrawOpHelper.h | 2 +- src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.cpp | 2 +- src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h | 2 +- src/gpu/ops/GrSmallPathRenderer.cpp | 2 +- src/gpu/ops/GrStencilPathOp.h | 2 +- src/gpu/ops/GrStrokeRectOp.cpp | 4 ++-- src/gpu/ops/GrTextureOp.cpp | 4 +++- src/gpu/ops/GrTriangulatingPathRenderer.cpp | 2 +- src/gpu/vk/GrVkCommandPool.h | 2 +- 38 files changed, 49 insertions(+), 47 deletions(-) diff --git a/src/gpu/GrFragmentProcessor.cpp b/src/gpu/GrFragmentProcessor.cpp index 05f69a9882..0fc28b41c6 100644 --- a/src/gpu/GrFragmentProcessor.cpp +++ b/src/gpu/GrFragmentProcessor.cpp @@ -75,7 +75,7 @@ const GrTextureEffect* GrFragmentProcessor::asTextureEffect() const { return nullptr; } -#ifdef SK_DEBUG +#if GR_TEST_UTILS static void recursive_dump_tree_info(const GrFragmentProcessor& fp, SkString indent, SkString* text) { diff --git a/src/gpu/GrFragmentProcessor.h b/src/gpu/GrFragmentProcessor.h index 5e603c98e8..bc5ff76ebc 100644 --- a/src/gpu/GrFragmentProcessor.h +++ b/src/gpu/GrFragmentProcessor.h @@ -250,7 +250,7 @@ public: GrTextureEffect* asTextureEffect(); const GrTextureEffect* asTextureEffect() const; -#ifdef SK_DEBUG +#if GR_TEST_UTILS // Generates debug info for this processor tree by recursively calling dumpInfo() on this // processor and its children. SkString dumpTreeInfo() const; diff --git a/src/gpu/GrProcessor.h b/src/gpu/GrProcessor.h index ba69873607..d7e3a02c66 100644 --- a/src/gpu/GrProcessor.h +++ b/src/gpu/GrProcessor.h @@ -184,7 +184,7 @@ public: virtual const char* name() const = 0; /** Human-readable dump of all information */ -#ifdef SK_DEBUG +#if GR_TEST_UTILS virtual SkString dumpInfo() const { return SkString(name()); } diff --git a/src/gpu/GrProcessorSet.cpp b/src/gpu/GrProcessorSet.cpp index 385284a0bc..c522ce85cc 100644 --- a/src/gpu/GrProcessorSet.cpp +++ b/src/gpu/GrProcessorSet.cpp @@ -49,7 +49,7 @@ GrProcessorSet::~GrProcessorSet() { } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString GrProcessorSet::dumpProcessors() const { SkString result; if (this->hasColorFragmentProcessor()) { diff --git a/src/gpu/GrProcessorSet.h b/src/gpu/GrProcessorSet.h index b43a4883e2..89feec41e7 100644 --- a/src/gpu/GrProcessorSet.h +++ b/src/gpu/GrProcessorSet.h @@ -143,7 +143,7 @@ public: static GrProcessorSet MakeEmptySet(); static constexpr Analysis EmptySetAnalysis() { return Analysis(Empty::kEmpty); } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpProcessors() const; #endif diff --git a/src/gpu/effects/GrBlendFragmentProcessor.cpp b/src/gpu/effects/GrBlendFragmentProcessor.cpp index bbe87256dc..0cfc4334ac 100644 --- a/src/gpu/effects/GrBlendFragmentProcessor.cpp +++ b/src/gpu/effects/GrBlendFragmentProcessor.cpp @@ -51,7 +51,7 @@ public: const char* name() const override { return "Blend"; } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { return SkStringPrintf("BlendFragmentProcessor(fMode=%s)", SkBlendMode_Name(fMode)); } diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h index 5743642bb0..8125cf4458 100644 --- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h +++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h @@ -40,7 +40,7 @@ public: const char* name() const override { return "GaussianConvolution"; } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { return SkStringPrintf("GaussianConvolutionFragmentProcessor(dir=%s, radius=%d)", Direction::kX == fDirection ? "X" : "Y", fRadius); diff --git a/src/gpu/effects/GrYUVtoRGBEffect.cpp b/src/gpu/effects/GrYUVtoRGBEffect.cpp index 0516a82f95..77f9567a72 100644 --- a/src/gpu/effects/GrYUVtoRGBEffect.cpp +++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp @@ -183,7 +183,7 @@ GrYUVtoRGBEffect::GrYUVtoRGBEffect(std::unique_ptr planeFPs } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString GrYUVtoRGBEffect::dumpInfo() const { SkString str("YUVtoRGBEffect("); for (int i = 0; i < 4; ++i) { diff --git a/src/gpu/effects/GrYUVtoRGBEffect.h b/src/gpu/effects/GrYUVtoRGBEffect.h index 469b353fb3..405d42e0ce 100644 --- a/src/gpu/effects/GrYUVtoRGBEffect.h +++ b/src/gpu/effects/GrYUVtoRGBEffect.h @@ -23,7 +23,7 @@ public: const SkMatrix& localMatrix = SkMatrix::I(), const SkRect* subset = nullptr, const SkRect* domain = nullptr); -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override; #endif diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp index 5fe579241c..4447f31577 100644 --- a/src/gpu/ops/GrAAConvexPathRenderer.cpp +++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp @@ -724,7 +724,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; string.appendf("Count: %d\n", fPaths.count()); diff --git a/src/gpu/ops/GrAAHairLinePathRenderer.cpp b/src/gpu/ops/GrAAHairLinePathRenderer.cpp index afe7105c38..138eacd10a 100644 --- a/src/gpu/ops/GrAAHairLinePathRenderer.cpp +++ b/src/gpu/ops/GrAAHairLinePathRenderer.cpp @@ -856,7 +856,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; string.appendf("Color: 0x%08x Coverage: 0x%02x, Count: %d\n", fColor.toBytes_RGBA(), diff --git a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp index fdd4162986..7a3738ccfc 100644 --- a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp +++ b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp @@ -186,7 +186,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; for (const auto& path : fPaths) { diff --git a/src/gpu/ops/GrAtlasTextOp.cpp b/src/gpu/ops/GrAtlasTextOp.cpp index 90e6fa9591..a0265c8b39 100644 --- a/src/gpu/ops/GrAtlasTextOp.cpp +++ b/src/gpu/ops/GrAtlasTextOp.cpp @@ -92,7 +92,7 @@ void GrAtlasTextOp::visitProxies(const VisitProxyFunc& func) const { fProcessors.visitProxies(func); } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString GrAtlasTextOp::dumpInfo() const { SkString str; diff --git a/src/gpu/ops/GrAtlasTextOp.h b/src/gpu/ops/GrAtlasTextOp.h index c275eb1856..f174af50d6 100644 --- a/src/gpu/ops/GrAtlasTextOp.h +++ b/src/gpu/ops/GrAtlasTextOp.h @@ -43,7 +43,7 @@ public: void visitProxies(const VisitProxyFunc& func) const override; -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override; #endif diff --git a/src/gpu/ops/GrClearOp.h b/src/gpu/ops/GrClearOp.h index 5eaff4bb19..bec4d899bb 100644 --- a/src/gpu/ops/GrClearOp.h +++ b/src/gpu/ops/GrClearOp.h @@ -30,7 +30,7 @@ public: const char* name() const override { return "Clear"; } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; string.append(INHERITED::dumpInfo()); diff --git a/src/gpu/ops/GrDashOp.cpp b/src/gpu/ops/GrDashOp.cpp index ce27d286fe..52e531999a 100644 --- a/src/gpu/ops/GrDashOp.cpp +++ b/src/gpu/ops/GrDashOp.cpp @@ -244,7 +244,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; for (const auto& geo : fLines) { diff --git a/src/gpu/ops/GrDefaultPathRenderer.cpp b/src/gpu/ops/GrDefaultPathRenderer.cpp index d711fdb665..84e32dde8c 100644 --- a/src/gpu/ops/GrDefaultPathRenderer.cpp +++ b/src/gpu/ops/GrDefaultPathRenderer.cpp @@ -369,7 +369,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; string.appendf("Color: 0x%08x Count: %d\n", fColor.toBytes_RGBA(), fPaths.count()); diff --git a/src/gpu/ops/GrDrawAtlasOp.cpp b/src/gpu/ops/GrDrawAtlasOp.cpp index 3248d41258..92a5a922b8 100644 --- a/src/gpu/ops/GrDrawAtlasOp.cpp +++ b/src/gpu/ops/GrDrawAtlasOp.cpp @@ -44,7 +44,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override; #endif @@ -186,7 +186,7 @@ DrawAtlasOp::DrawAtlasOp(const Helper::MakeArgs& helperArgs, const SkPMColor4f& this->setTransformedBounds(bounds, viewMatrix, HasAABloat::kNo, IsHairline::kNo); } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString DrawAtlasOp::dumpInfo() const { SkString string; for (const auto& geo : fGeoData) { diff --git a/src/gpu/ops/GrDrawPathOp.cpp b/src/gpu/ops/GrDrawPathOp.cpp index 3a60b6d62d..e026f4444a 100644 --- a/src/gpu/ops/GrDrawPathOp.cpp +++ b/src/gpu/ops/GrDrawPathOp.cpp @@ -37,7 +37,7 @@ GrDrawPathOpBase::GrDrawPathOpBase(uint32_t classID, const SkMatrix& viewMatrix, , fDoAA(GrAA::kYes == aa) , fProcessorSet(std::move(paint)) {} -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString GrDrawPathOp::dumpInfo() const { SkString string; string.printf("PATH: 0x%p", fPath.get()); diff --git a/src/gpu/ops/GrDrawPathOp.h b/src/gpu/ops/GrDrawPathOp.h index d7f2cc298c..069b19b41d 100644 --- a/src/gpu/ops/GrDrawPathOp.h +++ b/src/gpu/ops/GrDrawPathOp.h @@ -80,7 +80,7 @@ public: const char* name() const override { return "DrawPath"; } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override; #endif diff --git a/src/gpu/ops/GrDrawVerticesOp.cpp b/src/gpu/ops/GrDrawVerticesOp.cpp index ea678a2b1d..24fe8233c8 100644 --- a/src/gpu/ops/GrDrawVerticesOp.cpp +++ b/src/gpu/ops/GrDrawVerticesOp.cpp @@ -455,7 +455,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override; #endif @@ -581,7 +581,7 @@ DrawVerticesOp::DrawVerticesOp(const Helper::MakeArgs& helperArgs, zeroArea); } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString DrawVerticesOp::dumpInfo() const { SkString string; string.appendf("PrimType: %d, MeshCount %d, VCount: %d, ICount: %d\n", (int)fPrimitiveType, diff --git a/src/gpu/ops/GrDrawableOp.h b/src/gpu/ops/GrDrawableOp.h index 6c0debeb42..3c0c874f6d 100644 --- a/src/gpu/ops/GrDrawableOp.h +++ b/src/gpu/ops/GrDrawableOp.h @@ -26,7 +26,7 @@ public: const char* name() const override { return "Drawable"; } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { return INHERITED::dumpInfo(); } diff --git a/src/gpu/ops/GrFillRectOp.cpp b/src/gpu/ops/GrFillRectOp.cpp index 23f5d3a350..28322f5abc 100644 --- a/src/gpu/ops/GrFillRectOp.cpp +++ b/src/gpu/ops/GrFillRectOp.cpp @@ -29,7 +29,7 @@ namespace { using VertexSpec = GrQuadPerEdgeAA::VertexSpec; using ColorType = GrQuadPerEdgeAA::ColorType; -#ifdef SK_DEBUG +#if GR_TEST_UTILS static SkString dump_quad_info(int index, const GrQuad* deviceQuad, const GrQuad* localQuad, const SkPMColor4f& color, GrQuadAAFlags aaFlags) { @@ -120,7 +120,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString str; str.appendf("# draws: %u\n", fQuads.count()); diff --git a/src/gpu/ops/GrLatticeOp.cpp b/src/gpu/ops/GrLatticeOp.cpp index e09de27832..59cf2c090c 100644 --- a/src/gpu/ops/GrLatticeOp.cpp +++ b/src/gpu/ops/GrLatticeOp.cpp @@ -173,7 +173,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString str; diff --git a/src/gpu/ops/GrOp.h b/src/gpu/ops/GrOp.h index 83bf527ccf..fa5472a0e2 100644 --- a/src/gpu/ops/GrOp.h +++ b/src/gpu/ops/GrOp.h @@ -180,7 +180,7 @@ public: } /** Used for spewing information about ops when debugging. */ -#ifdef SK_DEBUG +#if GR_TEST_UTILS virtual SkString dumpInfo() const { SkString string; string.appendf("OpBounds: [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n", diff --git a/src/gpu/ops/GrOvalOpFactory.cpp b/src/gpu/ops/GrOvalOpFactory.cpp index b40fcb027b..537aa823ce 100644 --- a/src/gpu/ops/GrOvalOpFactory.cpp +++ b/src/gpu/ops/GrOvalOpFactory.cpp @@ -1226,7 +1226,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; for (int i = 0; i < fCircles.count(); ++i) { @@ -1588,7 +1588,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; for (int i = 0; i < fCircles.count(); ++i) { @@ -1919,7 +1919,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; string.appendf("Stroked: %d\n", fStroked); @@ -2196,7 +2196,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; for (const auto& geo : fEllipses) { @@ -2546,7 +2546,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; for (int i = 0; i < fRRects.count(); ++i) { @@ -2918,7 +2918,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; string.appendf("Stroked: %d\n", fStroked); diff --git a/src/gpu/ops/GrRegionOp.cpp b/src/gpu/ops/GrRegionOp.cpp index f9c1885d7c..8d6676237f 100644 --- a/src/gpu/ops/GrRegionOp.cpp +++ b/src/gpu/ops/GrRegionOp.cpp @@ -72,7 +72,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString str; str.appendf("# combined: %d\n", fRegions.count()); diff --git a/src/gpu/ops/GrShadowRRectOp.cpp b/src/gpu/ops/GrShadowRRectOp.cpp index 144e81bea6..02370936b5 100644 --- a/src/gpu/ops/GrShadowRRectOp.cpp +++ b/src/gpu/ops/GrShadowRRectOp.cpp @@ -239,7 +239,7 @@ public: const char* name() const override { return "ShadowCircularRRectOp"; } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; for (int i = 0; i < fGeoData.count(); ++i) { diff --git a/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp b/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp index 86dbc3374e..ae689e5e83 100644 --- a/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp +++ b/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp @@ -214,7 +214,7 @@ GrProgramInfo* GrSimpleMeshDrawOpHelper::createProgramInfo( this->pipelineFlags()); } -#ifdef SK_DEBUG +#if GR_TEST_UTILS static void dump_pipeline_flags(GrPipeline::InputFlags flags, SkString* result) { if (GrPipeline::InputFlags::kNone != flags) { if (flags & GrPipeline::InputFlags::kSnapVerticesToPixelCenters) { diff --git a/src/gpu/ops/GrSimpleMeshDrawOpHelper.h b/src/gpu/ops/GrSimpleMeshDrawOpHelper.h index 0f9e46a6c5..231e078e67 100644 --- a/src/gpu/ops/GrSimpleMeshDrawOpHelper.h +++ b/src/gpu/ops/GrSimpleMeshDrawOpHelper.h @@ -114,7 +114,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const; #endif GrAAType aaType() const { return static_cast(fAAType); } diff --git a/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.cpp b/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.cpp index 1af6bdb997..202f2e57f7 100644 --- a/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.cpp +++ b/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.cpp @@ -89,7 +89,7 @@ GrProgramInfo* GrSimpleMeshDrawOpHelperWithStencil::createProgramInfoWithStencil this->stencilSettings()); } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString GrSimpleMeshDrawOpHelperWithStencil::dumpInfo() const { SkString result = INHERITED::dumpInfo(); result.appendf("Stencil settings: %s\n", (fStencilSettings ? "yes" : "no")); diff --git a/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h b/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h index e76693a1dd..9eb8b689e3 100644 --- a/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h +++ b/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h @@ -78,7 +78,7 @@ public: const SkRect& thisBounds, const SkRect& thatBounds, bool ignoreAAType = false) const; -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const; #endif diff --git a/src/gpu/ops/GrSmallPathRenderer.cpp b/src/gpu/ops/GrSmallPathRenderer.cpp index 95b40c67a1..cdbc5b44ea 100644 --- a/src/gpu/ops/GrSmallPathRenderer.cpp +++ b/src/gpu/ops/GrSmallPathRenderer.cpp @@ -136,7 +136,7 @@ public: fHelper.visitProxies(func); } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; for (const auto& geo : fShapes) { diff --git a/src/gpu/ops/GrStencilPathOp.h b/src/gpu/ops/GrStencilPathOp.h index a3c9198862..33cebd352b 100644 --- a/src/gpu/ops/GrStencilPathOp.h +++ b/src/gpu/ops/GrStencilPathOp.h @@ -30,7 +30,7 @@ public: const char* name() const override { return "StencilPathOp"; } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; string.printf("Path: 0x%p, AA: %d", fPath.get(), fUseHWAA); diff --git a/src/gpu/ops/GrStrokeRectOp.cpp b/src/gpu/ops/GrStrokeRectOp.cpp index 7bbfc0f81e..28d5a9b6b7 100644 --- a/src/gpu/ops/GrStrokeRectOp.cpp +++ b/src/gpu/ops/GrStrokeRectOp.cpp @@ -99,7 +99,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; string.appendf( @@ -428,7 +428,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; for (const auto& info : fRects) { diff --git a/src/gpu/ops/GrTextureOp.cpp b/src/gpu/ops/GrTextureOp.cpp index d3a1c62280..2d84a5ac8f 100644 --- a/src/gpu/ops/GrTextureOp.cpp +++ b/src/gpu/ops/GrTextureOp.cpp @@ -276,7 +276,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString str; str.appendf("# draws: %d\n", fQuads.count()); @@ -308,7 +308,9 @@ public: str += INHERITED::dumpInfo(); return str; } +#endif +#ifdef SK_DEBUG static void ValidateResourceLimits() { // The op implementation has an upper bound on the number of quads that it can represent. // However, the resource manager imposes its own limit on the number of quads, which should diff --git a/src/gpu/ops/GrTriangulatingPathRenderer.cpp b/src/gpu/ops/GrTriangulatingPathRenderer.cpp index 64429f0c96..15baa4543d 100644 --- a/src/gpu/ops/GrTriangulatingPathRenderer.cpp +++ b/src/gpu/ops/GrTriangulatingPathRenderer.cpp @@ -190,7 +190,7 @@ public: } } -#ifdef SK_DEBUG +#if GR_TEST_UTILS SkString dumpInfo() const override { SkString string; string.appendf("Color 0x%08x, aa: %d\n", fColor.toBytes_RGBA(), fAntiAlias); diff --git a/src/gpu/vk/GrVkCommandPool.h b/src/gpu/vk/GrVkCommandPool.h index 5b8dd74f5e..69ffb6cf38 100644 --- a/src/gpu/vk/GrVkCommandPool.h +++ b/src/gpu/vk/GrVkCommandPool.h @@ -41,7 +41,7 @@ public: // returns true if close() has not been called bool isOpen() const { return fOpen; } -#ifdef SK_DEBUG +#ifdef SK_TRACE_MANAGED_RESOURCES void dumpInfo() const override { SkDebugf("GrVkCommandPool: %p (%d refs)\n", fCommandPool, this->getRefCnt()); }