aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bench/benchmain.cpp5
-rw-r--r--include/core/SkPath.h3
-rw-r--r--src/core/SkPath.cpp2
3 files changed, 9 insertions, 1 deletions
diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp
index 73aa9885f7..fa43155da9 100644
--- a/bench/benchmain.cpp
+++ b/bench/benchmain.cpp
@@ -439,8 +439,11 @@ static void help() {
}
int main (int argc, char * const argv[]) {
+#ifdef SK_ENABLE_INST_COUNT
+ gPrintInstCount = true;
+#endif
SkAutoGraphics ag;
-
+
SkTDict<const char*> defineDict(1024);
int repeatDraw = 1;
bool logPerIter = false;
diff --git a/include/core/SkPath.h b/include/core/SkPath.h
index 2bd2d76777..ae8ecb7997 100644
--- a/include/core/SkPath.h
+++ b/include/core/SkPath.h
@@ -10,6 +10,7 @@
#ifndef SkPath_DEFINED
#define SkPath_DEFINED
+#include "SkInstCnt.h"
#include "SkMatrix.h"
#include "SkTDArray.h"
@@ -33,6 +34,8 @@ class SkString;
*/
class SK_API SkPath {
public:
+ SK_DECLARE_INST_COUNT_ROOT(SkPath);
+
SkPath();
SkPath(const SkPath&);
~SkPath();
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 1127e956ea..a9937ab9a0 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -11,6 +11,8 @@
#include "SkBuffer.h"
#include "SkMath.h"
+SK_DEFINE_INST_COUNT(SkPath);
+
// This value is just made-up for now. When count is 4, calling memset was much
// slower than just writing the loop. This seems odd, and hopefully in the
// future this we appear to have been a fluke...