aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/batches/GrDrawBatch.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2016-12-01 09:35:30 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-01 15:07:31 +0000
commit7c3e7180948766321c51d165737555e78910de51 (patch)
treeab6c72364dfcd10b020e6f6a1382af62ede7d0c4 /src/gpu/batches/GrDrawBatch.h
parent1c038af278a69186e988dd9348b4089d78759492 (diff)
Remove pipeline info dump from GrDrawBatch
Also adds more overrides of GrBatch::dumpInfo. This removes a use case of the GrPipeline member of GrDrawBatch. Change-Id: I93f5f2993be41ffa290122f12a683d2bac453e1d Reviewed-on: https://skia-review.googlesource.com/5354 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/batches/GrDrawBatch.h')
-rw-r--r--src/gpu/batches/GrDrawBatch.h32
1 files changed, 15 insertions, 17 deletions
diff --git a/src/gpu/batches/GrDrawBatch.h b/src/gpu/batches/GrDrawBatch.h
index 95516c9363..c92dca346a 100644
--- a/src/gpu/batches/GrDrawBatch.h
+++ b/src/gpu/batches/GrDrawBatch.h
@@ -75,40 +75,38 @@ public:
return this->pipeline()->getRenderTarget()->uniqueID();
}
- SkString dumpInfo() const override {
+protected:
+ static SkString DumpPipelineInfo(const GrPipeline& pipeline) {
SkString string;
- string.appendf("RT: %d\n", this->renderTargetUniqueID().asUInt());
+ string.appendf("RT: %d\n", pipeline.getRenderTarget()->uniqueID().asUInt());
string.append("ColorStages:\n");
- for (int i = 0; i < this->pipeline()->numColorFragmentProcessors(); i++) {
+ for (int i = 0; i < pipeline.numColorFragmentProcessors(); i++) {
string.appendf("\t\t%s\n\t\t%s\n",
- this->pipeline()->getColorFragmentProcessor(i).name(),
- this->pipeline()->getColorFragmentProcessor(i).dumpInfo().c_str());
+ pipeline.getColorFragmentProcessor(i).name(),
+ pipeline.getColorFragmentProcessor(i).dumpInfo().c_str());
}
string.append("CoverageStages:\n");
- for (int i = 0; i < this->pipeline()->numCoverageFragmentProcessors(); i++) {
+ for (int i = 0; i < pipeline.numCoverageFragmentProcessors(); i++) {
string.appendf("\t\t%s\n\t\t%s\n",
- this->pipeline()->getCoverageFragmentProcessor(i).name(),
- this->pipeline()->getCoverageFragmentProcessor(i).dumpInfo().c_str());
+ pipeline.getCoverageFragmentProcessor(i).name(),
+ pipeline.getCoverageFragmentProcessor(i).dumpInfo().c_str());
}
- string.appendf("XP: %s\n", this->pipeline()->getXferProcessor().name());
+ string.appendf("XP: %s\n", pipeline.getXferProcessor().name());
- bool scissorEnabled = this->pipeline()->getScissorState().enabled();
+ bool scissorEnabled = pipeline.getScissorState().enabled();
string.appendf("Scissor: ");
if (scissorEnabled) {
string.appendf("[L: %d, T: %d, R: %d, B: %d]\n",
- this->pipeline()->getScissorState().rect().fLeft,
- this->pipeline()->getScissorState().rect().fTop,
- this->pipeline()->getScissorState().rect().fRight,
- this->pipeline()->getScissorState().rect().fBottom);
+ pipeline.getScissorState().rect().fLeft,
+ pipeline.getScissorState().rect().fTop,
+ pipeline.getScissorState().rect().fRight,
+ pipeline.getScissorState().rect().fBottom);
} else {
string.appendf("<disabled>\n");
}
- string.append(INHERITED::dumpInfo());
-
return string;
}
-protected:
const GrPipeline* pipeline() const {
SkASSERT(fPipelineInstalled);
return reinterpret_cast<const GrPipeline*>(fPipelineStorage.get());