Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Unified Diff: tools/debugger/SkDrawCommand.cpp

Issue 1745513002: Add abilitly to query audit trail for batches by draw op (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: tweaks Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/debugger/SkDrawCommand.h ('k') | tools/skiaserve/Request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « tools/debugger/SkDrawCommand.h ('k') | tools/skiaserve/Request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698