Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 8d9bf64

Browse files
johnstiles-googleSkia Commit-Bot
authored andcommitted
Reland "Guard dumpInfo() calls with GR_TEST_UTILS, instead of SK_DEBUG."
and "Guard gencode dumpInfo() calls with GR_TEST_UTILS, instead of SK_DEBUG" and "Remove dumpInfo() entirely when GR_TEST_UTILS is off." This is a reland of 2690078 and b5e8a25 and d7b09c4 and unit tests are now fixed. Original change's description: > 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> Change-Id: I16e6606082a814b4fa5ef58d1096fc915f5ac704 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309721 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
1 parent e12939f commit 8d9bf64

File tree

105 files changed

+155
-130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+155
-130
lines changed

src/gpu/GrFragmentProcessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const GrTextureEffect* GrFragmentProcessor::asTextureEffect() const {
7575
return nullptr;
7676
}
7777

78-
#ifdef SK_DEBUG
78+
#if GR_TEST_UTILS
7979
static void recursive_dump_tree_info(const GrFragmentProcessor& fp,
8080
SkString indent,
8181
SkString* text) {

src/gpu/GrFragmentProcessor.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,10 @@ class GrFragmentProcessor : public GrProcessor {
250250
GrTextureEffect* asTextureEffect();
251251
const GrTextureEffect* asTextureEffect() const;
252252

253-
#ifdef SK_DEBUG
253+
#if GR_TEST_UTILS
254254
// Generates debug info for this processor tree by recursively calling dumpInfo() on this
255255
// processor and its children.
256256
SkString dumpTreeInfo() const;
257-
#else
258-
SkString dumpTreeInfo() const { return dumpInfo(); }
259257
#endif
260258

261259
// A pre-order traversal iterator over a hierarchy of FPs. It can also iterate over all the FP

src/gpu/GrProcessor.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,10 @@ class GrProcessor {
184184
virtual const char* name() const = 0;
185185

186186
/** Human-readable dump of all information */
187-
#ifdef SK_DEBUG
187+
#if GR_TEST_UTILS
188188
virtual SkString dumpInfo() const {
189189
return SkString(name());
190190
}
191-
#else
192-
SkString dumpInfo() const { return SkString("<Processor information unavailable>"); }
193191
#endif
194192

195193
/**

src/gpu/GrProcessorSet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ GrProcessorSet::~GrProcessorSet() {
4949
}
5050
}
5151

52-
#ifdef SK_DEBUG
52+
#if GR_TEST_UTILS
5353
SkString GrProcessorSet::dumpProcessors() const {
5454
SkString result;
5555
if (this->hasColorFragmentProcessor()) {

src/gpu/GrProcessorSet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class GrProcessorSet {
143143
static GrProcessorSet MakeEmptySet();
144144
static constexpr Analysis EmptySetAnalysis() { return Analysis(Empty::kEmpty); }
145145

146-
#ifdef SK_DEBUG
146+
#if GR_TEST_UTILS
147147
SkString dumpProcessors() const;
148148
#endif
149149

src/gpu/effects/GrBlendFragmentProcessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class BlendFragmentProcessor : public GrFragmentProcessor {
5151

5252
const char* name() const override { return "Blend"; }
5353

54-
#ifdef SK_DEBUG
54+
#if GR_TEST_UTILS
5555
SkString dumpInfo() const override {
5656
return SkStringPrintf("BlendFragmentProcessor(fMode=%s)", SkBlendMode_Name(fMode));
5757
}

src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class GrGaussianConvolutionFragmentProcessor : public GrFragmentProcessor {
4040

4141
const char* name() const override { return "GaussianConvolution"; }
4242

43-
#ifdef SK_DEBUG
43+
#if GR_TEST_UTILS
4444
SkString dumpInfo() const override {
4545
return SkStringPrintf("GaussianConvolutionFragmentProcessor(dir=%s, radius=%d)",
4646
Direction::kX == fDirection ? "X" : "Y", fRadius);

src/gpu/effects/GrYUVtoRGBEffect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ GrYUVtoRGBEffect::GrYUVtoRGBEffect(std::unique_ptr<GrFragmentProcessor> planeFPs
183183
}
184184
}
185185

186-
#ifdef SK_DEBUG
186+
#if GR_TEST_UTILS
187187
SkString GrYUVtoRGBEffect::dumpInfo() const {
188188
SkString str("YUVtoRGBEffect(");
189189
for (int i = 0; i < 4; ++i) {

src/gpu/effects/GrYUVtoRGBEffect.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class GrYUVtoRGBEffect : public GrFragmentProcessor {
2323
const SkMatrix& localMatrix = SkMatrix::I(),
2424
const SkRect* subset = nullptr,
2525
const SkRect* domain = nullptr);
26-
#ifdef SK_DEBUG
26+
#if GR_TEST_UTILS
2727
SkString dumpInfo() const override;
2828
#endif
2929

src/gpu/effects/generated/GrAARectEffect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ GrAARectEffect::GrAARectEffect(const GrAARectEffect& src)
110110
std::unique_ptr<GrFragmentProcessor> GrAARectEffect::clone() const {
111111
return std::make_unique<GrAARectEffect>(*this);
112112
}
113-
#ifdef SK_DEBUG
113+
#if GR_TEST_UTILS
114114
SkString GrAARectEffect::dumpInfo() const {
115115
return SkStringPrintf("AARectEffect(edgeType=%d, rect=float4(%f, %f, %f, %f))", (int)edgeType,
116116
rect.left(), rect.top(), rect.right(), rect.bottom());

0 commit comments

Comments
 (0)