Index: src/utils/SkEventTracer.cpp |
diff --git a/src/utils/SkEventTracer.cpp b/src/utils/SkEventTracer.cpp |
index f9e72de6b8ee4817d824b803a6305bc90d6230af..bd9676bce63a3ff9734d73d4c9c67dfa331baca9 100644 |
--- a/src/utils/SkEventTracer.cpp |
+++ b/src/utils/SkEventTracer.cpp |
@@ -38,8 +38,10 @@ class SkDefaultEventTracer: public SkEventTracer { |
SkEventTracer *SkEventTracer::gInstance; |
-static void intiailize_default_tracer(int) { |
- SkEventTracer::SetInstance(SkNEW(SkDefaultEventTracer)); |
+static void intialiize_default_tracer(void *current_instance) { |
+ if (NULL == current_instance) { |
+ SkEventTracer::SetInstance(SkNEW(SkDefaultEventTracer)); |
+ } |
} |
static void cleanup_tracer() { |
@@ -49,7 +51,10 @@ static void cleanup_tracer() { |
SkEventTracer* SkEventTracer::GetInstance() { |
SK_DECLARE_STATIC_ONCE(once); |
- SkOnce(&once, intiailize_default_tracer, 0, cleanup_tracer); |
+ SkOnce(&once, |
+ intialiize_default_tracer, |
+ SkEventTracer::gInstance, |
+ cleanup_tracer); |
SkASSERT(NULL != SkEventTracer::gInstance); |
return SkEventTracer::gInstance; |
} |