diff options
author | joshualitt <joshualitt@chromium.org> | 2016-02-17 11:20:26 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-17 11:20:26 -0800 |
commit | 6b3cf73af525fdbf6fd093304db840bb998e3dd6 (patch) | |
tree | 59b9b55fee42e6041f6f87cadca2efec108c0150 /src | |
parent | 91e457d17f8c6c06de33eb2bb430a90ba472eda5 (diff) |
Add batch information to json
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1705093002
Review URL: https://codereview.chromium.org/1705093002
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrAuditTrail.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gpu/GrAuditTrail.cpp b/src/gpu/GrAuditTrail.cpp index 6ff04d1144..4329cbe062 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 { |