aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/utils/SkEventTracer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/utils/SkEventTracer.h')
-rw-r--r--include/utils/SkEventTracer.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/utils/SkEventTracer.h b/include/utils/SkEventTracer.h
index f4f8676a74..a0289ce9eb 100644
--- a/include/utils/SkEventTracer.h
+++ b/include/utils/SkEventTracer.h
@@ -27,9 +27,18 @@ public:
typedef uint64_t Handle;
- static SkEventTracer* GetInstance();
+ /**
+ * If this is the first call to SetInstance or GetInstance then the passed instance is
+ * installed and true is returned. Otherwise, false is returned. In either case ownership of the
+ * tracer is transferred and it will be deleted when no longer needed.
+ */
+ static bool SetInstance(SkEventTracer*);
- static void SetInstance(SkEventTracer*);
+ /**
+ * Gets the event tracer. If this is the first call to SetInstance or GetIntance then a default
+ * event tracer is installed and returned.
+ */
+ static SkEventTracer* GetInstance();
virtual ~SkEventTracer() { }