aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GrMemoryPoolTest.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-01-13 08:22:43 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-13 08:22:44 -0800
commit6f07665768dc84453316e7b2bbd6049576764cb1 (patch)
tree0ff3637043c0f4f7588a98762c91b3dbe1b0c413 /tests/GrMemoryPoolTest.cpp
parentc3796c7a74e103d9b367ad9449fcdacfa20d83e1 (diff)
Simplify SkInstCnt
This code requires fewer macros to use it (just one), has less code in macro definitions, and has simpler synchronization code (just atomic ints, no SkOnce, no SkMutex, etc.) A minor downside, we lose indentation and reverse-ordering in the final report: Leaked SkRefCntBase: 7 Leaked SkFontMgr: 1 Leaked SkWeakRefCnt: 1 Leaked SkTypeface: 1 Leaked SkFlattenable: 3 Leaked SkXfermode: 3 Leaked SkPathRef: 1 Leaked SkPixelRef: 1 Leaked SkMallocPixelRef: 1 becomes Leaked SkXfermode: 3 Leaked SkMallocPixelRef: 1 Leaked SkPixelRef: 1 Leaked SkPathRef: 1 Leaked SkFlattenable: 3 Leaked SkTypeface: 1 Leaked SkWeakRefCnt: 1 Leaked SkFontMgr: 1 Leaked SkRefCntBase: 7 This is motivated by wanting to land https://codereview.chromium.org/806473006/, which makes sure all static use of SkOnce are in global scope. The current implementation of SkInstCnt uses them in function scope, which isn't safe. BUG=skia: No public API changes. TBR=reed@google.com Review URL: https://codereview.chromium.org/841263004
Diffstat (limited to 'tests/GrMemoryPoolTest.cpp')
-rw-r--r--tests/GrMemoryPoolTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/GrMemoryPoolTest.cpp b/tests/GrMemoryPoolTest.cpp
index 0848d97f74..1ba184b45f 100644
--- a/tests/GrMemoryPoolTest.cpp
+++ b/tests/GrMemoryPoolTest.cpp
@@ -44,7 +44,7 @@ public:
}
}
- SK_DECLARE_INST_COUNT_ROOT(A);
+ SK_DECLARE_INST_COUNT(A);
static A* Create(SkRandom* r);