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 <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
47b4e22303
commit
26900788ef
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ GrProcessorSet::~GrProcessorSet() {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SK_DEBUG
|
||||
#if GR_TEST_UTILS
|
||||
SkString GrProcessorSet::dumpProcessors() const {
|
||||
SkString result;
|
||||
if (this->hasColorFragmentProcessor()) {
|
||||
|
@ -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
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -183,7 +183,7 @@ GrYUVtoRGBEffect::GrYUVtoRGBEffect(std::unique_ptr<GrFragmentProcessor> planeFPs
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SK_DEBUG
|
||||
#if GR_TEST_UTILS
|
||||
SkString GrYUVtoRGBEffect::dumpInfo() const {
|
||||
SkString str("YUVtoRGBEffect(");
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
|
@ -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
|
||||
|
||||
|
@ -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());
|
||||
|
@ -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(),
|
||||
|
@ -186,7 +186,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SK_DEBUG
|
||||
#if GR_TEST_UTILS
|
||||
SkString dumpInfo() const override {
|
||||
SkString string;
|
||||
for (const auto& path : fPaths) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
|
||||
void visitProxies(const VisitProxyFunc& func) const override;
|
||||
|
||||
#ifdef SK_DEBUG
|
||||
#if GR_TEST_UTILS
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
|
||||
|
@ -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());
|
||||
|
@ -244,7 +244,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SK_DEBUG
|
||||
#if GR_TEST_UTILS
|
||||
SkString dumpInfo() const override {
|
||||
SkString string;
|
||||
for (const auto& geo : fLines) {
|
||||
|
@ -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());
|
||||
|
@ -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) {
|
||||
|
@ -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());
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
|
||||
const char* name() const override { return "DrawPath"; }
|
||||
|
||||
#ifdef SK_DEBUG
|
||||
#if GR_TEST_UTILS
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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());
|
||||
|
@ -173,7 +173,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SK_DEBUG
|
||||
#if GR_TEST_UTILS
|
||||
SkString dumpInfo() const override {
|
||||
SkString str;
|
||||
|
||||
|
@ -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",
|
||||
|
@ -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);
|
||||
|
@ -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());
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -114,7 +114,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SK_DEBUG
|
||||
#if GR_TEST_UTILS
|
||||
SkString dumpInfo() const;
|
||||
#endif
|
||||
GrAAType aaType() const { return static_cast<GrAAType>(fAAType); }
|
||||
|
@ -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"));
|
||||
|
@ -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
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user