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

Unified Diff: include/private/GrAuditTrail.h

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/gpu/GrContext.h ('k') | src/gpu/GrAuditTrail.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/private/GrAuditTrail.h
diff --git a/include/private/GrAuditTrail.h b/include/private/GrAuditTrail.h
new file mode 100644
index 0000000000000000000000000000000000000000..02b971ef448c0fe4fa82a3c2cf8747f796717550
--- /dev/null
+++ b/include/private/GrAuditTrail.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrAuditTrail_DEFINED
+#define GrAuditTrail_DEFINED
+
+#include "SkString.h"
+#include "SkTArray.h"
+
+/*
+ * GrAuditTrail collects a list of draw ops, detailed information about those ops, and can dump them
+ * to json.
+ */
+class GrAuditTrail {
+public:
+ void addOp(SkString name) {
+ fOps.push_back().fName = name;
+ }
+
+ SkString toJson() const;
+
+ void reset() { fOps.reset(); }
+
+private:
+ struct Op {
+ SkString toJson() const;
+ SkString fName;
+ };
+
+ SkTArray<Op> fOps;
+};
+
+#endif
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrAuditTrail.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698