aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrAuditTrail.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2016-01-08 07:19:47 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-08 07:19:47 -0800
commit27a48dc0cddad7f3531dcf0d39d290e7233e3e76 (patch)
tree28db08c91e0250c67d8e093ca68c87d11d05a701 /src/gpu/GrAuditTrail.cpp
parent55c86abedc7dcc76f5f04a256e46bb3bb065b2cb (diff)
Create stub GrAuditTrail class
Diffstat (limited to 'src/gpu/GrAuditTrail.cpp')
-rw-r--r--src/gpu/GrAuditTrail.cpp32
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;
+}
+