diff options
author | joshualitt <joshualitt@chromium.org> | 2016-01-08 07:19:47 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-08 07:19:47 -0800 |
commit | 27a48dc0cddad7f3531dcf0d39d290e7233e3e76 (patch) | |
tree | 28db08c91e0250c67d8e093ca68c87d11d05a701 /src/gpu/GrAuditTrail.cpp | |
parent | 55c86abedc7dcc76f5f04a256e46bb3bb065b2cb (diff) |
Create stub GrAuditTrail class
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1572553002
Review URL: https://codereview.chromium.org/1572553002
Diffstat (limited to 'src/gpu/GrAuditTrail.cpp')
-rw-r--r-- | src/gpu/GrAuditTrail.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/gpu/GrAuditTrail.cpp b/src/gpu/GrAuditTrail.cpp new file mode 100644 index 0000000000..3c29d5647d --- /dev/null +++ b/src/gpu/GrAuditTrail.cpp @@ -0,0 +1,32 @@ +/* + * Copyright 2016 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "GrAuditTrail.h" + +SkString GrAuditTrail::toJson() const { + SkString json; + json.append("{\n"); + json.append("Ops: [\n"); + for (int i = 0; i < fOps.count(); i++) { + json.append(fOps[i].toJson()); + if (i < fOps.count() - 1) { + json.append(",\n"); + } + } + json.append("]\n"); + json.append("}\n"); + return json; +} + +SkString GrAuditTrail::Op::toJson() const { + SkString json; + json.append("{\n"); + json.appendf("%s\n", fName.c_str()); + json.append("}\n"); + return json; +} + |