diff options
author | joshualitt <joshualitt@chromium.org> | 2016-03-10 13:29:36 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-10 13:29:36 -0800 |
commit | ae47aeeda09408989223291c54d12b2a98fa2b12 (patch) | |
tree | f34e151d3ec1c575e5f26f8158be081cbaca88c2 /src/gpu/GrAuditTrail.cpp | |
parent | bd73ffb83022f1f6b1997e2a91c049949e88a8a2 (diff) |
Fix some bugs and performance issues with skiaserve
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1777203003
Review URL: https://codereview.chromium.org/1777203003
Diffstat (limited to 'src/gpu/GrAuditTrail.cpp')
-rw-r--r-- | src/gpu/GrAuditTrail.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gpu/GrAuditTrail.cpp b/src/gpu/GrAuditTrail.cpp index 21b7a29251..353d90183c 100644 --- a/src/gpu/GrAuditTrail.cpp +++ b/src/gpu/GrAuditTrail.cpp @@ -147,14 +147,13 @@ void GrAuditTrail::JsonifyTArray(SkString* json, const char* name, const T& arra json->appendf(","); } json->appendf("\"%s\": [", name); + const char* separator = ""; for (int i = 0; i < array.count(); i++) { // Handle sentinel nullptrs - if (!array[i]) { - continue; - } - json->append(array[i]->toJson()); - if (i < array.count() - 1) { - json->append(","); + if (array[i]) { + json->appendf("%s", separator); + json->append(array[i]->toJson()); + separator = ","; } } json->append("]"); |