diff options
Diffstat (limited to 'src/gpu/batches')
-rw-r--r-- | src/gpu/batches/GrBatch.h | 7 | ||||
-rw-r--r-- | src/gpu/batches/GrClearBatch.h | 2 | ||||
-rw-r--r-- | src/gpu/batches/GrCopySurfaceBatch.h | 1 | ||||
-rw-r--r-- | src/gpu/batches/GrDiscardBatch.h | 1 | ||||
-rw-r--r-- | src/gpu/batches/GrDrawBatch.h | 14 | ||||
-rw-r--r-- | src/gpu/batches/GrDrawPathBatch.cpp | 2 | ||||
-rw-r--r-- | src/gpu/batches/GrStencilPathBatch.h | 1 |
7 files changed, 27 insertions, 1 deletions
diff --git a/src/gpu/batches/GrBatch.h b/src/gpu/batches/GrBatch.h index b26cdde73c..b0906ab690 100644 --- a/src/gpu/batches/GrBatch.h +++ b/src/gpu/batches/GrBatch.h @@ -118,7 +118,12 @@ public: virtual uint32_t renderTargetUniqueID() const = 0; /** Used for spewing information about batches when debugging. */ - virtual SkString dumpInfo() const = 0; + virtual SkString dumpInfo() const { + SkString string; + string.appendf("BatchBounds: [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n", + fBounds.fLeft, fBounds.fTop, fBounds.fRight, fBounds.fBottom); + return string; + } /** Can remove this when multi-draw-buffer lands */ virtual GrRenderTarget* renderTarget() const = 0; diff --git a/src/gpu/batches/GrClearBatch.h b/src/gpu/batches/GrClearBatch.h index f2249cedb2..79e10ca167 100644 --- a/src/gpu/batches/GrClearBatch.h +++ b/src/gpu/batches/GrClearBatch.h @@ -36,6 +36,7 @@ public: string.printf("Color: 0x%08x, Rect [L: %d, T: %d, R: %d, B: %d], RT: %d", fColor, fRect.fLeft, fRect.fTop, fRect.fRight, fRect.fBottom, fRenderTarget.get()->getUniqueID()); + string.append(INHERITED::dumpInfo()); return string; } @@ -92,6 +93,7 @@ public: string.printf("Rect [L: %d, T: %d, R: %d, B: %d], IC: %d, RT: 0x%p", fRect.fLeft, fRect.fTop, fRect.fRight, fRect.fBottom, fInsideClip, fRenderTarget.get()); + string.append(INHERITED::dumpInfo()); return string; } diff --git a/src/gpu/batches/GrCopySurfaceBatch.h b/src/gpu/batches/GrCopySurfaceBatch.h index 900bcf3fda..e0da431587 100644 --- a/src/gpu/batches/GrCopySurfaceBatch.h +++ b/src/gpu/batches/GrCopySurfaceBatch.h @@ -44,6 +44,7 @@ public: "DPT:[X: %d, Y: %d]", fDst.get(), fSrc.get(), fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBottom, fDstPoint.fX, fDstPoint.fY); + string.append(INHERITED::dumpInfo()); return string; } diff --git a/src/gpu/batches/GrDiscardBatch.h b/src/gpu/batches/GrDiscardBatch.h index 3c19b68246..a739f23b7d 100644 --- a/src/gpu/batches/GrDiscardBatch.h +++ b/src/gpu/batches/GrDiscardBatch.h @@ -31,6 +31,7 @@ public: SkString dumpInfo() const override { SkString string; string.printf("RT: %d", fRenderTarget.get()->getUniqueID()); + string.append(INHERITED::dumpInfo()); return string; } diff --git a/src/gpu/batches/GrDrawBatch.h b/src/gpu/batches/GrDrawBatch.h index bf93cf5a72..0386650380 100644 --- a/src/gpu/batches/GrDrawBatch.h +++ b/src/gpu/batches/GrDrawBatch.h @@ -100,6 +100,20 @@ public: this->pipeline()->getCoverageFragmentProcessor(i).dumpInfo().c_str()); } string.appendf("XP: %s\n", this->pipeline()->getXferProcessor().name()); + + bool scissorEnabled = this->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); + } else { + string.appendf("<disabled>\n"); + } + string.append(INHERITED::dumpInfo()); + return string; } diff --git a/src/gpu/batches/GrDrawPathBatch.cpp b/src/gpu/batches/GrDrawPathBatch.cpp index 751ddda4ea..b0f7d5e89c 100644 --- a/src/gpu/batches/GrDrawPathBatch.cpp +++ b/src/gpu/batches/GrDrawPathBatch.cpp @@ -22,6 +22,7 @@ void GrDrawPathBatchBase::onPrepare(GrBatchFlushState*) { SkString GrDrawPathBatch::dumpInfo() const { SkString string; string.printf("PATH: 0x%p", fPath.get()); + string.append(INHERITED::dumpInfo()); return string; } @@ -43,6 +44,7 @@ SkString GrDrawPathRangeBatch::dumpInfo() const { } string.remove(string.size() - 2, 2); string.append("]"); + string.append(INHERITED::dumpInfo()); return string; } diff --git a/src/gpu/batches/GrStencilPathBatch.h b/src/gpu/batches/GrStencilPathBatch.h index 05b55efafa..42cd3e9f93 100644 --- a/src/gpu/batches/GrStencilPathBatch.h +++ b/src/gpu/batches/GrStencilPathBatch.h @@ -39,6 +39,7 @@ public: SkString dumpInfo() const override { SkString string; string.printf("PATH: 0x%p, AA:%d", fPath.get(), fUseHWAA); + string.append(INHERITED::dumpInfo()); return string; } |