diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrDrawingManager.cpp | 8 | ||||
-rw-r--r-- | src/gpu/GrOpList.cpp | 17 | ||||
-rw-r--r-- | src/gpu/GrRenderTargetOpList.cpp | 4 | ||||
-rw-r--r-- | src/gpu/GrRenderTargetOpList.h | 2 | ||||
-rw-r--r-- | src/gpu/GrTextureOpList.cpp | 4 | ||||
-rw-r--r-- | src/gpu/GrTextureOpList.h | 2 | ||||
-rw-r--r-- | src/gpu/ops/GrOp.h | 3 |
7 files changed, 27 insertions, 13 deletions
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp index 86fee30925..a704bafa2c 100644 --- a/src/gpu/GrDrawingManager.cpp +++ b/src/gpu/GrDrawingManager.cpp @@ -264,6 +264,14 @@ static void end_oplist_flush_if_not_unique(const sk_sp<GrOpList>& opList) { bool GrDrawingManager::executeOpLists(int startIndex, int stopIndex, GrOpFlushState* flushState) { SkASSERT(startIndex <= stopIndex && stopIndex <= fOpLists.count()); +#if GR_FLUSH_TIME_OP_SPEW + SkDebugf("Flushing opLists: %d to %d out of [%d, %d]\n", + startIndex, stopIndex, 0, fOpLists.count()); + for (int i = startIndex; i < stopIndex; ++i) { + fOpLists[i]->dump(false); + } +#endif + GrResourceProvider* resourceProvider = fContext->contextPriv().resourceProvider(); bool anyOpListsExecuted = false; diff --git a/src/gpu/GrOpList.cpp b/src/gpu/GrOpList.cpp index bdaaa2ab4a..6fed34a38c 100644 --- a/src/gpu/GrOpList.cpp +++ b/src/gpu/GrOpList.cpp @@ -124,14 +124,17 @@ bool GrOpList::isInstantiated() const { } #ifdef SK_DEBUG -void GrOpList::dump() const { +void GrOpList::dump(bool printDependencies) const { SkDebugf("--------------------------------------------------------------\n"); - SkDebugf("node: %d -> RT: %d\n", fUniqueID, fTarget.get() ? fTarget.get()->uniqueID().asUInt() - : -1); - SkDebugf("relies On (%d): ", fDependencies.count()); - for (int i = 0; i < fDependencies.count(); ++i) { - SkDebugf("%d, ", fDependencies[i]->fUniqueID); + SkDebugf("opList: %d -> RT: %d\n", fUniqueID, fTarget.get() ? fTarget.get()->uniqueID().asUInt() + : -1); + + if (printDependencies) { + SkDebugf("relies On (%d): ", fDependencies.count()); + for (int i = 0; i < fDependencies.count(); ++i) { + SkDebugf("%d, ", fDependencies[i]->fUniqueID); + } + SkDebugf("\n"); } - SkDebugf("\n"); } #endif diff --git a/src/gpu/GrRenderTargetOpList.cpp b/src/gpu/GrRenderTargetOpList.cpp index 47eb3a0789..a68d78ac65 100644 --- a/src/gpu/GrRenderTargetOpList.cpp +++ b/src/gpu/GrRenderTargetOpList.cpp @@ -38,8 +38,8 @@ GrRenderTargetOpList::~GrRenderTargetOpList() { //////////////////////////////////////////////////////////////////////////////// #ifdef SK_DEBUG -void GrRenderTargetOpList::dump() const { - INHERITED::dump(); +void GrRenderTargetOpList::dump(bool printDependencies) const { + INHERITED::dump(printDependencies); SkDebugf("ops (%d):\n", fRecordedOps.count()); for (int i = 0; i < fRecordedOps.count(); ++i) { diff --git a/src/gpu/GrRenderTargetOpList.h b/src/gpu/GrRenderTargetOpList.h index c0a72333da..938f69aba6 100644 --- a/src/gpu/GrRenderTargetOpList.h +++ b/src/gpu/GrRenderTargetOpList.h @@ -109,7 +109,7 @@ public: GrRenderTargetOpList* asRenderTargetOpList() override { return this; } - SkDEBUGCODE(void dump() const override;) + SkDEBUGCODE(void dump(bool printDependencies) const override;) SkDEBUGCODE(int numOps() const override { return fRecordedOps.count(); }) SkDEBUGCODE(int numClips() const override { return fNumClips; }) diff --git a/src/gpu/GrTextureOpList.cpp b/src/gpu/GrTextureOpList.cpp index 45deb2d59b..c09dbffba5 100644 --- a/src/gpu/GrTextureOpList.cpp +++ b/src/gpu/GrTextureOpList.cpp @@ -28,8 +28,8 @@ GrTextureOpList::~GrTextureOpList() { //////////////////////////////////////////////////////////////////////////////// #ifdef SK_DEBUG -void GrTextureOpList::dump() const { - INHERITED::dump(); +void GrTextureOpList::dump(bool printDependencies) const { + INHERITED::dump(printDependencies); SkDebugf("ops (%d):\n", fRecordedOps.count()); for (int i = 0; i < fRecordedOps.count(); ++i) { diff --git a/src/gpu/GrTextureOpList.h b/src/gpu/GrTextureOpList.h index 42da738390..510a895b67 100644 --- a/src/gpu/GrTextureOpList.h +++ b/src/gpu/GrTextureOpList.h @@ -56,7 +56,7 @@ public: GrTextureOpList* asTextureOpList() override { return this; } - SkDEBUGCODE(void dump() const override;) + SkDEBUGCODE(void dump(bool printDependencies) const override;) SkDEBUGCODE(int numOps() const override { return fRecordedOps.count(); }) diff --git a/src/gpu/ops/GrOp.h b/src/gpu/ops/GrOp.h index 5f6177009a..50edcf9611 100644 --- a/src/gpu/ops/GrOp.h +++ b/src/gpu/ops/GrOp.h @@ -51,6 +51,9 @@ class GrRenderTargetOpList; #define GrOP_INFO(...) #endif +// Print out op information at flush time +#define GR_FLUSH_TIME_OP_SPEW 0 + // A helper macro to generate a class static id #define DEFINE_OP_CLASS_ID \ static uint32_t ClassID() { \ |