aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/core/SkInstCnt.h8
-rw-r--r--src/core/SkMaskGamma.h8
-rw-r--r--src/core/SkScalerContext.cpp1
3 files changed, 15 insertions, 2 deletions
diff --git a/include/core/SkInstCnt.h b/include/core/SkInstCnt.h
index 9be51ea634..db6e273e9f 100644
--- a/include/core/SkInstCnt.h
+++ b/include/core/SkInstCnt.h
@@ -113,11 +113,19 @@ extern bool gPrintInstCount;
SkTArray<className::SkInstanceCountHelper::PFCheckInstCnt>* \
className::SkInstanceCountHelper::gChildren = NULL;
+#define SK_DEFINE_INST_COUNT_TEMPLATE(templateInfo, className) \
+ templateInfo int32_t className::SkInstanceCountHelper::gInstanceCount = 0;\
+ templateInfo bool className::SkInstanceCountHelper::gInited = false; \
+ templateInfo \
+ SkTArray<typename className::SkInstanceCountHelper::PFCheckInstCnt>*\
+ className::SkInstanceCountHelper::gChildren = NULL;
+
#else
#define SK_DECLARE_INST_COUNT(className)
#define SK_DECLARE_INST_COUNT_TEMPLATE(className)
#define SK_DECLARE_INST_COUNT_ROOT(className)
#define SK_DEFINE_INST_COUNT(className)
+#define SK_DEFINE_INST_COUNT_TEMPLATE(templateInfo, className)
#endif
#endif // SkInstCnt_DEFINED
diff --git a/src/core/SkMaskGamma.h b/src/core/SkMaskGamma.h
index 369127ad49..7d8b9e310b 100644
--- a/src/core/SkMaskGamma.h
+++ b/src/core/SkMaskGamma.h
@@ -105,7 +105,7 @@ void SkTMaskGamma_build_correcting_lut(uint8_t table[256], U8CPU srcI, SkScalar
*/
template <int R_LUM_BITS, int G_LUM_BITS, int B_LUM_BITS> class SkTMaskGamma : public SkRefCnt {
public:
- //SK_DECLARE_INST_COUNT_TEMPLATE(SkTMaskGamma)
+ SK_DECLARE_INST_COUNT_TEMPLATE(SkTMaskGamma)
/**
* Creates tables to convert linear alpha values to gamma correcting alpha
@@ -157,6 +157,12 @@ private:
typedef SkRefCnt INHERITED;
};
+
+#define MacroComma ,
+SK_DEFINE_INST_COUNT_TEMPLATE(
+ template <int R_LUM_BITS MacroComma int G_LUM_BITS MacroComma int B_LUM_BITS>,
+ SkTMaskGamma<R_LUM_BITS MacroComma G_LUM_BITS MacroComma B_LUM_BITS>);
+
/**
* SkTMaskPreBlend is a tear-off of SkTMaskGamma. It provides the tables to
* convert a linear alpha value for a given channel to a gamma correcting alpha
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index 0a06965e95..a1473be55c 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -22,7 +22,6 @@
#include "SkStroke.h"
#include "SkThread.h"
-//SK_DEFINE_INST_COUNT(SkMaskGamma)
#define ComputeBWRowBytes(width) (((unsigned)(width) + 7) >> 3)