Index: tools/debugger/SkDrawCommand.cpp |
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp |
index 33e49ce75edec556435fc5f4437c64d4a826255c..1af299831f22d6f6e0790b68568b077fb59404e4 100644 |
--- a/tools/debugger/SkDrawCommand.cpp |
+++ b/tools/debugger/SkDrawCommand.cpp |
@@ -228,7 +228,8 @@ Json::Value SkDrawCommand::toJSON(UrlDataManager& urlDataManager) const { |
} |
Json::Value SkDrawCommand::drawToAndCollectJSON(SkCanvas* canvas, |
- UrlDataManager& urlDataManager) const { |
+ UrlDataManager& urlDataManager, |
+ int opIndex) const { |
Json::Value result = this->toJSON(urlDataManager); |
SkASSERT(canvas); |
@@ -239,19 +240,18 @@ Json::Value SkDrawCommand::drawToAndCollectJSON(SkCanvas* canvas, |
GrContext* ctx = rt->getContext(); |
if(ctx) { |
GrAuditTrail* at = ctx->getAuditTrail(); |
- GrAuditTrail::AutoEnable enable(at); |
+ GrAuditTrail::AutoCollectBatches enable(at, opIndex); |
this->execute(canvas); |
// TODO if this is inefficient we could add a method to GrAuditTrail which takes |
// a Json::Value and is only compiled in this file |
Json::Value parsedFromString; |
Json::Reader reader; |
- SkDEBUGCODE(bool parsingSuccessful = )reader.parse(at->toJson().c_str(), |
+ SkDEBUGCODE(bool parsingSuccessful = )reader.parse(at->toJson(opIndex).c_str(), |
parsedFromString); |
SkASSERT(parsingSuccessful); |
result[SKDEBUGCANVAS_ATTRIBUTE_AUDITTRAIL] = parsedFromString; |
- at->reset(); |
} |
} |
#endif |