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

Unified Diff: src/gpu/GrAuditTrail.cpp

Issue 1572553002: Create stub GrAuditTrail class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: minor nit Created 4 years, 11 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') | no next file » | 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
new file mode 100644
index 0000000000000000000000000000000000000000..3c29d5647d96d16137b6af10618f70ded769f70e
--- /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;
+}
+
« no previous file with comments | « include/private/GrAuditTrail.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698