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

Side by Side Diff: src/animator/SkMemberInfo.h

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 months 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
« no previous file with comments | « src/animator/SkMatrixParts.cpp ('k') | src/animator/SkMemberInfo.cpp » ('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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkMemberInfo_DEFINED 10 #ifndef SkMemberInfo_DEFINED
(...skipping 14 matching lines...) Expand all
25 25
26 // temporary hacks until name change is more complete 26 // temporary hacks until name change is more complete
27 #define SkFloat SkScalar 27 #define SkFloat SkScalar
28 #define SkInt SkS32 28 #define SkInt SkS32
29 29
30 struct SkMemberInfo { 30 struct SkMemberInfo {
31 //!!! alternative: 31 //!!! alternative:
32 // if fCount == 0, record is member property 32 // if fCount == 0, record is member property
33 // then fType can be type, so caller doesn't have to check 33 // then fType can be type, so caller doesn't have to check
34 #if SK_USE_CONDENSED_INFO == 0 34 #if SK_USE_CONDENSED_INFO == 0
35 const char* fName; // may be NULL for anonymous functions 35 const char* fName; // may be nullptr for anonymous functions
36 size_t fOffset; // if negative, is index into member pointer table (for prop erties and functions) 36 size_t fOffset; // if negative, is index into member pointer table (for prop erties and functions)
37 SkDisplayTypes fType; 37 SkDisplayTypes fType;
38 int fCount; // for properties, actual type (count is always assumed to be 1) 38 int fCount; // for properties, actual type (count is always assumed to be 1)
39 #else 39 #else
40 unsigned char fName; 40 unsigned char fName;
41 signed char fOffset; 41 signed char fOffset;
42 unsigned char fType; 42 unsigned char fType;
43 signed char fCount; 43 signed char fCount;
44 #endif 44 #endif
45 SkDisplayTypes arrayType() const { 45 SkDisplayTypes arrayType() const {
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 #else 223 #else
224 224
225 #define DECLARE_PRIVATE_MEMBER_INFO(_type) \ 225 #define DECLARE_PRIVATE_MEMBER_INFO(_type) \
226 public: \ 226 public: \
227 typedef Sk##_type BASE_CLASS 227 typedef Sk##_type BASE_CLASS
228 228
229 #define DECLARE_MEMBER_INFO(_type) \ 229 #define DECLARE_MEMBER_INFO(_type) \
230 public: \ 230 public: \
231 virtual const SkMemberInfo* getMember(int index) { \ 231 virtual const SkMemberInfo* getMember(int index) { \
232 return SkDisplayType::GetMember(NULL, SkType_##_type, &index); } \ 232 return SkDisplayType::GetMember(nullptr, SkType_##_type, &index); } \
233 virtual const SkMemberInfo* getMember(const char name[]) { \ 233 virtual const SkMemberInfo* getMember(const char name[]) { \
234 return SkDisplayType::GetMember(NULL, SkType_##_type, &name); } \ 234 return SkDisplayType::GetMember(nullptr, SkType_##_type, &name); } \
235 virtual SkDisplayTypes getType() const { return SkType_##_type; } \ 235 virtual SkDisplayTypes getType() const { return SkType_##_type; } \
236 typedef Sk##_type BASE_CLASS 236 typedef Sk##_type BASE_CLASS
237 237
238 #define DECLARE_DRAW_MEMBER_INFO(_type) \ 238 #define DECLARE_DRAW_MEMBER_INFO(_type) \
239 public: \ 239 public: \
240 virtual const SkMemberInfo* getMember(int index) { \ 240 virtual const SkMemberInfo* getMember(int index) { \
241 return SkDisplayType::GetMember(NULL, SkType_##_type, &index); } \ 241 return SkDisplayType::GetMember(nullptr, SkType_##_type, &index); } \
242 virtual const SkMemberInfo* getMember(const char name[]) { \ 242 virtual const SkMemberInfo* getMember(const char name[]) { \
243 return SkDisplayType::GetMember(NULL, SkType_##_type, &name); } \ 243 return SkDisplayType::GetMember(nullptr, SkType_##_type, &name); } \
244 virtual SkDisplayTypes getType() const { return SkType_##_type; } \ 244 virtual SkDisplayTypes getType() const { return SkType_##_type; } \
245 typedef SkDraw##_type BASE_CLASS 245 typedef SkDraw##_type BASE_CLASS
246 246
247 #define DECLARE_DISPLAY_MEMBER_INFO(_type) \ 247 #define DECLARE_DISPLAY_MEMBER_INFO(_type) \
248 public: \ 248 public: \
249 virtual const SkMemberInfo* getMember(int index) { \ 249 virtual const SkMemberInfo* getMember(int index) { \
250 return SkDisplayType::GetMember(NULL, SkType_##_type, &index); } \ 250 return SkDisplayType::GetMember(nullptr, SkType_##_type, &index); } \
251 virtual const SkMemberInfo* getMember(const char name[]) { \ 251 virtual const SkMemberInfo* getMember(const char name[]) { \
252 return SkDisplayType::GetMember(NULL, SkType_##_type, &name); } \ 252 return SkDisplayType::GetMember(nullptr, SkType_##_type, &name); } \
253 virtual SkDisplayTypes getType() const { return SkType_##_type; } \ 253 virtual SkDisplayTypes getType() const { return SkType_##_type; } \
254 typedef SkDisplay##_type BASE_CLASS 254 typedef SkDisplay##_type BASE_CLASS
255 255
256 #define DECLARE_EXTRAS_MEMBER_INFO(_type) \ 256 #define DECLARE_EXTRAS_MEMBER_INFO(_type) \
257 public: \ 257 public: \
258 virtual const SkMemberInfo* getMember(int index) { \ 258 virtual const SkMemberInfo* getMember(int index) { \
259 return SkDisplayType::GetMember(NULL, SkType_##_type, &index); } \ 259 return SkDisplayType::GetMember(nullptr, SkType_##_type, &index); } \
260 virtual const SkMemberInfo* getMember(const char name[]) { \ 260 virtual const SkMemberInfo* getMember(const char name[]) { \
261 return SkDisplayType::GetMember(NULL, fType, &name); } \ 261 return SkDisplayType::GetMember(nullptr, fType, &name); } \
262 SkDisplayTypes fType; \ 262 SkDisplayTypes fType; \
263 virtual SkDisplayTypes getType() const { return fType; } \ 263 virtual SkDisplayTypes getType() const { return fType; } \
264 typedef _type BASE_CLASS 264 typedef _type BASE_CLASS
265 265
266 #define DECLARE_NO_VIRTUALS_MEMBER_INFO(_type) \ 266 #define DECLARE_NO_VIRTUALS_MEMBER_INFO(_type) \
267 public: \ 267 public: \
268 typedef Sk##_type BASE_CLASS 268 typedef Sk##_type BASE_CLASS
269 269
270 #define DEFINE_GET_MEMBER(_class) 270 #define DEFINE_GET_MEMBER(_class)
271 #define DEFINE_NO_VIRTUALS_GET_MEMBER(_class) 271 #define DEFINE_NO_VIRTUALS_GET_MEMBER(_class)
272 272
273 #endif 273 #endif
274 274
275 #endif // SkMemberInfo_DEFINED 275 #endif // SkMemberInfo_DEFINED
OLDNEW
« no previous file with comments | « src/animator/SkMatrixParts.cpp ('k') | src/animator/SkMemberInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698