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

Unified Diff: src/gpu/GrAuditTrail.cpp

Issue 1705093002: Add batch information to json (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix cpu bot 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 | « include/private/GrAuditTrail.h ('k') | tools/debugger/SkDebugCanvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAuditTrail.cpp
diff --git a/src/gpu/GrAuditTrail.cpp b/src/gpu/GrAuditTrail.cpp
index 6ff04d114460fdec628aaaa4984af1ff70ab670f..4329cbe062f505ff2a08e15fe1a0ed9a47e97bda 100644
--- a/src/gpu/GrAuditTrail.cpp
+++ b/src/gpu/GrAuditTrail.cpp
@@ -87,14 +87,17 @@ static SkString pretty_print_json(SkString json) {
return prettyPrintJson.prettify(json);
}
-SkString GrAuditTrail::toJson() const {
+SkString GrAuditTrail::toJson(bool prettyPrint) const {
SkString json;
json.append("{");
JsonifyTArray(&json, "Stacks", fFrames);
json.append("}");
- // TODO if this becomes a performance issue we should make pretty print configurable
- return pretty_print_json(json);
+ if (prettyPrint) {
+ return pretty_print_json(json);
+ } else {
+ return json;
+ }
}
SkString GrAuditTrail::Frame::toJson() const {
« no previous file with comments | « include/private/GrAuditTrail.h ('k') | tools/debugger/SkDebugCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698