Skip to content

Commit af36652

Browse files
johnstiles-googleSkia Commit-Bot
authored andcommitted
Move non-gencode onDumpInfo methods to private section.
`onXxxxx` methods in Skia are generally intended to be non-public. Change-Id: I26b6bdcee653f41a22c91f79d01b20a274210747 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309981 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
1 parent 326b989 commit af36652

24 files changed

Lines changed: 353 additions & 355 deletions

src/gpu/effects/GrBlendFragmentProcessor.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ class BlendFragmentProcessor : public GrFragmentProcessor {
5151

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

54-
#if GR_TEST_UTILS
55-
SkString onDumpInfo() const override {
56-
return SkStringPrintf("(fMode=%s)", SkBlendMode_Name(fMode));
57-
}
58-
#endif
59-
6054
std::unique_ptr<GrFragmentProcessor> clone() const override;
6155

6256
SkBlendMode getMode() const { return fMode; }
@@ -84,6 +78,12 @@ class BlendFragmentProcessor : public GrFragmentProcessor {
8478
this->cloneAndRegisterAllChildProcessors(that);
8579
}
8680

81+
#if GR_TEST_UTILS
82+
SkString onDumpInfo() const override {
83+
return SkStringPrintf("(fMode=%s)", SkBlendMode_Name(fMode));
84+
}
85+
#endif
86+
8787
static OptimizationFlags OptFlags(const GrFragmentProcessor* src,
8888
const GrFragmentProcessor* dst, SkBlendMode mode) {
8989
OptimizationFlags flags;

src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,6 @@ class GrGaussianConvolutionFragmentProcessor : public GrFragmentProcessor {
4040

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

43-
#if GR_TEST_UTILS
44-
SkString onDumpInfo() const override {
45-
return SkStringPrintf("(dir=%s, radius=%d)",
46-
Direction::kX == fDirection ? "X" : "Y", fRadius);
47-
}
48-
#endif
49-
5043
std::unique_ptr<GrFragmentProcessor> clone() const override {
5144
return std::unique_ptr<GrFragmentProcessor>(
5245
new GrGaussianConvolutionFragmentProcessor(*this));
@@ -66,6 +59,13 @@ class GrGaussianConvolutionFragmentProcessor : public GrFragmentProcessor {
6659

6760
explicit GrGaussianConvolutionFragmentProcessor(const GrGaussianConvolutionFragmentProcessor&);
6861

62+
#if GR_TEST_UTILS
63+
SkString onDumpInfo() const override {
64+
return SkStringPrintf("(dir=%s, radius=%d)",
65+
Direction::kX == fDirection ? "X" : "Y", fRadius);
66+
}
67+
#endif
68+
6969
GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
7070

7171
void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;

src/gpu/effects/GrYUVtoRGBEffect.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ class GrYUVtoRGBEffect : public GrFragmentProcessor {
2323
const SkMatrix& localMatrix = SkMatrix::I(),
2424
const SkRect* subset = nullptr,
2525
const SkRect* domain = nullptr);
26-
#if GR_TEST_UTILS
27-
SkString onDumpInfo() const override;
28-
#endif
29-
3026
std::unique_ptr<GrFragmentProcessor> clone() const override;
3127

3228
const char* name() const override { return "YUVtoRGBEffect"; }
@@ -40,6 +36,10 @@ class GrYUVtoRGBEffect : public GrFragmentProcessor {
4036

4137
GrYUVtoRGBEffect(const GrYUVtoRGBEffect& src);
4238

39+
#if GR_TEST_UTILS
40+
SkString onDumpInfo() const override;
41+
#endif
42+
4343
GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
4444

4545
void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;

src/gpu/ops/GrAAConvexPathRenderer.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -724,12 +724,6 @@ class AAConvexPathOp final : public GrMeshDrawOp {
724724
}
725725
}
726726

727-
#if GR_TEST_UTILS
728-
SkString onDumpInfo() const override {
729-
return SkStringPrintf("Count: %d\n%s", fPaths.count(), fHelper.dumpInfo().c_str());
730-
}
731-
#endif
732-
733727
FixedFunctionFlags fixedFunctionFlags() const override { return fHelper.fixedFunctionFlags(); }
734728

735729
GrProcessorSet::Analysis finalize(
@@ -879,6 +873,12 @@ class AAConvexPathOp final : public GrMeshDrawOp {
879873
return CombineResult::kMerged;
880874
}
881875

876+
#if GR_TEST_UTILS
877+
SkString onDumpInfo() const override {
878+
return SkStringPrintf("Count: %d\n%s", fPaths.count(), fHelper.dumpInfo().c_str());
879+
}
880+
#endif
881+
882882
struct PathData {
883883
SkMatrix fViewMatrix;
884884
SkPath fPath;

src/gpu/ops/GrAAHairLinePathRenderer.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -856,14 +856,6 @@ class AAHairlineOp final : public GrMeshDrawOp {
856856
}
857857
}
858858

859-
#if GR_TEST_UTILS
860-
SkString onDumpInfo() const override {
861-
return SkStringPrintf("Color: 0x%08x Coverage: 0x%02x, Count: %d\n%s",
862-
fColor.toBytes_RGBA(), fCoverage, fPaths.count(),
863-
fHelper.dumpInfo().c_str());
864-
}
865-
#endif
866-
867859
FixedFunctionFlags fixedFunctionFlags() const override { return fHelper.fixedFunctionFlags(); }
868860

869861
GrProcessorSet::Analysis finalize(
@@ -961,6 +953,14 @@ class AAHairlineOp final : public GrMeshDrawOp {
961953
return CombineResult::kMerged;
962954
}
963955

956+
#if GR_TEST_UTILS
957+
SkString onDumpInfo() const override {
958+
return SkStringPrintf("Color: 0x%08x Coverage: 0x%02x, Count: %d\n%s",
959+
fColor.toBytes_RGBA(), fCoverage, fPaths.count(),
960+
fHelper.dumpInfo().c_str());
961+
}
962+
#endif
963+
964964
const SkPMColor4f& color() const { return fColor; }
965965
uint8_t coverage() const { return fCoverage; }
966966
const SkMatrix& viewMatrix() const { return fPaths[0].fViewMatrix; }

src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -186,21 +186,6 @@ class AAFlatteningConvexPathOp final : public GrMeshDrawOp {
186186
}
187187
}
188188

189-
#if GR_TEST_UTILS
190-
SkString onDumpInfo() const override {
191-
SkString string;
192-
for (const auto& path : fPaths) {
193-
string.appendf(
194-
"Color: 0x%08x, StrokeWidth: %.2f, Style: %d, Join: %d, "
195-
"MiterLimit: %.2f\n",
196-
path.fColor.toBytes_RGBA(), path.fStrokeWidth, path.fStyle, path.fJoin,
197-
path.fMiterLimit);
198-
}
199-
string += fHelper.dumpInfo();
200-
return string;
201-
}
202-
#endif
203-
204189
FixedFunctionFlags fixedFunctionFlags() const override { return fHelper.fixedFunctionFlags(); }
205190

206191
GrProcessorSet::Analysis finalize(
@@ -363,6 +348,20 @@ class AAFlatteningConvexPathOp final : public GrMeshDrawOp {
363348
return CombineResult::kMerged;
364349
}
365350

351+
#if GR_TEST_UTILS
352+
SkString onDumpInfo() const override {
353+
SkString string;
354+
for (const auto& path : fPaths) {
355+
string.appendf(
356+
"Color: 0x%08x, StrokeWidth: %.2f, Style: %d, Join: %d, "
357+
"MiterLimit: %.2f\n",
358+
path.fColor.toBytes_RGBA(), path.fStrokeWidth, path.fStyle, path.fJoin,
359+
path.fMiterLimit);
360+
}
361+
string += fHelper.dumpInfo();
362+
return string;
363+
}
364+
#endif
366365

367366
struct PathData {
368367
SkMatrix fViewMatrix;

src/gpu/ops/GrAtlasTextOp.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ class GrAtlasTextOp final : public GrMeshDrawOp {
4343

4444
void visitProxies(const VisitProxyFunc& func) const override;
4545

46-
#if GR_TEST_UTILS
47-
SkString onDumpInfo() const override;
48-
#endif
49-
5046
FixedFunctionFlags fixedFunctionFlags() const override;
5147

5248
GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*,
@@ -130,6 +126,10 @@ class GrAtlasTextOp final : public GrMeshDrawOp {
130126
void onPrepareDraws(Target*) override;
131127
void onExecute(GrOpFlushState*, const SkRect& chainBounds) override;
132128

129+
#if GR_TEST_UTILS
130+
SkString onDumpInfo() const override;
131+
#endif
132+
133133
GrMaskFormat maskFormat() const {
134134
switch (fMaskType) {
135135
case kLCDCoverageMask_MaskType:

src/gpu/ops/GrClearOp.h

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,6 @@ class GrClearOp final : public GrOp {
3030

3131
const char* name() const override { return "Clear"; }
3232

33-
#if GR_TEST_UTILS
34-
SkString onDumpInfo() const override {
35-
SkString string("Scissor [ ");
36-
if (fScissor.enabled()) {
37-
const SkIRect& r = fScissor.rect();
38-
string.appendf("L: %d, T: %d, R: %d, B: %d", r.fLeft, r.fTop, r.fRight, r.fBottom);
39-
} else {
40-
string.append("disabled");
41-
}
42-
string.appendf("], Color: 0x%08x\n", fColor.toBytes_RGBA());
43-
return string;
44-
}
45-
#endif
46-
4733
private:
4834
friend class GrOpMemoryPool; // for ctors
4935

@@ -66,6 +52,19 @@ class GrClearOp final : public GrOp {
6652
void onPrepare(GrOpFlushState*) override {}
6753

6854
void onExecute(GrOpFlushState* state, const SkRect& chainBounds) override;
55+
#if GR_TEST_UTILS
56+
SkString onDumpInfo() const override {
57+
SkString string("Scissor [ ");
58+
if (fScissor.enabled()) {
59+
const SkIRect& r = fScissor.rect();
60+
string.appendf("L: %d, T: %d, R: %d, B: %d", r.fLeft, r.fTop, r.fRight, r.fBottom);
61+
} else {
62+
string.append("disabled");
63+
}
64+
string.appendf("], Color: 0x%08x\n", fColor.toBytes_RGBA());
65+
return string;
66+
}
67+
#endif
6968

7069
GrScissorState fScissor;
7170
SkPMColor4f fColor;

src/gpu/ops/GrDashOp.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -244,24 +244,6 @@ class DashOp final : public GrMeshDrawOp {
244244
}
245245
}
246246

247-
#if GR_TEST_UTILS
248-
SkString onDumpInfo() const override {
249-
SkString string;
250-
for (const auto& geo : fLines) {
251-
string.appendf("Pt0: [%.2f, %.2f], Pt1: [%.2f, %.2f], Width: %.2f, Ival0: %.2f, "
252-
"Ival1 : %.2f, Phase: %.2f\n",
253-
geo.fPtsRot[0].fX, geo.fPtsRot[0].fY,
254-
geo.fPtsRot[1].fX, geo.fPtsRot[1].fY,
255-
geo.fSrcStrokeWidth,
256-
geo.fIntervals[0],
257-
geo.fIntervals[1],
258-
geo.fPhase);
259-
}
260-
string += fProcessorSet.dumpProcessors();
261-
return string;
262-
}
263-
#endif
264-
265247
FixedFunctionFlags fixedFunctionFlags() const override {
266248
FixedFunctionFlags flags = FixedFunctionFlags::kNone;
267249
if (AAMode::kCoverageWithMSAA == fAAMode) {
@@ -713,6 +695,24 @@ class DashOp final : public GrMeshDrawOp {
713695
return CombineResult::kMerged;
714696
}
715697

698+
#if GR_TEST_UTILS
699+
SkString onDumpInfo() const override {
700+
SkString string;
701+
for (const auto& geo : fLines) {
702+
string.appendf("Pt0: [%.2f, %.2f], Pt1: [%.2f, %.2f], Width: %.2f, Ival0: %.2f, "
703+
"Ival1 : %.2f, Phase: %.2f\n",
704+
geo.fPtsRot[0].fX, geo.fPtsRot[0].fY,
705+
geo.fPtsRot[1].fX, geo.fPtsRot[1].fY,
706+
geo.fSrcStrokeWidth,
707+
geo.fIntervals[0],
708+
geo.fIntervals[1],
709+
geo.fPhase);
710+
}
711+
string += fProcessorSet.dumpProcessors();
712+
return string;
713+
}
714+
#endif
715+
716716
const SkPMColor4f& color() const { return fColor; }
717717
const SkMatrix& viewMatrix() const { return fLines[0].fViewMatrix; }
718718
AAMode aaMode() const { return fAAMode; }

src/gpu/ops/GrDefaultPathRenderer.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -369,18 +369,6 @@ class DefaultPathOp final : public GrMeshDrawOp {
369369
}
370370
}
371371

372-
#if GR_TEST_UTILS
373-
SkString onDumpInfo() const override {
374-
SkString string = SkStringPrintf("Color: 0x%08x Count: %d\n",
375-
fColor.toBytes_RGBA(), fPaths.count());
376-
for (const auto& path : fPaths) {
377-
string.appendf("Tolerance: %.2f\n", path.fTolerance);
378-
}
379-
string += fHelper.dumpInfo();
380-
return string;
381-
}
382-
#endif
383-
384372
DefaultPathOp(const Helper::MakeArgs& helperArgs, const SkPMColor4f& color, const SkPath& path,
385373
SkScalar tolerance, uint8_t coverage, const SkMatrix& viewMatrix, bool isHairline,
386374
GrAAType aaType, const SkRect& devBounds,
@@ -508,6 +496,18 @@ class DefaultPathOp final : public GrMeshDrawOp {
508496
return CombineResult::kMerged;
509497
}
510498

499+
#if GR_TEST_UTILS
500+
SkString onDumpInfo() const override {
501+
SkString string = SkStringPrintf("Color: 0x%08x Count: %d\n",
502+
fColor.toBytes_RGBA(), fPaths.count());
503+
for (const auto& path : fPaths) {
504+
string.appendf("Tolerance: %.2f\n", path.fTolerance);
505+
}
506+
string += fHelper.dumpInfo();
507+
return string;
508+
}
509+
#endif
510+
511511
const SkPMColor4f& color() const { return fColor; }
512512
uint8_t coverage() const { return fCoverage; }
513513
const SkMatrix& viewMatrix() const { return fViewMatrix; }

0 commit comments

Comments
 (0)