Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1385)

Side by Side Diff: include/core/SkInstCnt.h

Issue 98703002: Fix compilation with SK_ENABLE_INST_COUNT=1 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | include/lazy/SkLruImageCache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #ifndef SkInstCnt_DEFINED 9 #ifndef SkInstCnt_DEFINED
10 #define SkInstCnt_DEFINED 10 #define SkInstCnt_DEFINED
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 className::SkInstanceCountHelper::gChildren = NULL; 116 className::SkInstanceCountHelper::gChildren = NULL;
117 117
118 #define SK_DEFINE_INST_COUNT_TEMPLATE(templateInfo, className) \ 118 #define SK_DEFINE_INST_COUNT_TEMPLATE(templateInfo, className) \
119 templateInfo int32_t className::SkInstanceCountHelper::gInstanceCount = 0;\ 119 templateInfo int32_t className::SkInstanceCountHelper::gInstanceCount = 0;\
120 templateInfo bool className::SkInstanceCountHelper::gInited = false; \ 120 templateInfo bool className::SkInstanceCountHelper::gInited = false; \
121 templateInfo \ 121 templateInfo \
122 SkTArray<typename className::SkInstanceCountHelper::PFCheckInstCnt>*\ 122 SkTArray<typename className::SkInstanceCountHelper::PFCheckInstCnt>*\
123 className::SkInstanceCountHelper::gChildren = NULL; 123 className::SkInstanceCountHelper::gChildren = NULL;
124 124
125 #else 125 #else
126 #define SK_DECLARE_INST_COUNT(className) 126 #define SK_DECLARE_INST_COUNT(className) static void AddInstChild() { INHERITED: :AddInstChild(); }
bsalomon 2013/12/02 15:19:45 nice, should we have a comment explaining why this
127 #define SK_DECLARE_INST_COUNT_TEMPLATE(className) 127 #define SK_DECLARE_INST_COUNT_TEMPLATE(className) static void AddInstChild() { I NHERITED::AddInstChild(); }
128 #define SK_DECLARE_INST_COUNT_ROOT(className) 128 #define SK_DECLARE_INST_COUNT_ROOT(className) static void AddInstChild() { }
129 #define SK_DEFINE_INST_COUNT(className) 129 #define SK_DEFINE_INST_COUNT(className)
130 #define SK_DEFINE_INST_COUNT_TEMPLATE(templateInfo, className) 130 #define SK_DEFINE_INST_COUNT_TEMPLATE(templateInfo, className)
131 #endif 131 #endif
132 132
133 #endif // SkInstCnt_DEFINED 133 #endif // SkInstCnt_DEFINED
OLDNEW
« no previous file with comments | « no previous file | include/lazy/SkLruImageCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698