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

Side by Side Diff: include/utils/SkRTConf.h

Issue 1927583002: Repurpose Release_Developer BUILDTYPE and remove SK_DEVELOPER. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix typo Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google, Inc. 2 * Copyright 2013 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 SkRTConf_DEFINED 9 #ifndef SkRTConf_DEFINED
10 #define SkRTConf_DEFINED 10 #define SkRTConf_DEFINED
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 bool isDefault() const { return fDefault == fValue; } 42 bool isDefault() const { return fDefault == fValue; }
43 void set(const T& value) { fValue = value; } 43 void set(const T& value) { fValue = value; }
44 protected: 44 protected:
45 void doPrint(char *s) const; 45 void doPrint(char *s) const;
46 46
47 T fValue; 47 T fValue;
48 T fDefault; 48 T fDefault;
49 SkString fDescription; 49 SkString fDescription;
50 }; 50 };
51 51
52 #ifdef SK_DEVELOPER 52 #ifdef SK_DEBUG
53 #define SK_CONF_DECLARE(confType, varName, confName, defaultValue, description) static SkRTConf<confType> varName(confName, defaultValue, description) 53 #define SK_CONF_DECLARE(confType, varName, confName, defaultValue, description) static SkRTConf<confType> varName(confName, defaultValue, description)
54 #define SK_CONF_SET(confname, value) \ 54 #define SK_CONF_SET(confname, value) \
55 skRTConfRegistry().set(confname, value, true) 55 skRTConfRegistry().set(confname, value, true)
56 /* SK_CONF_TRY_SET() is like SK_CONF_SET(), but doesn't complain if 56 /* SK_CONF_TRY_SET() is like SK_CONF_SET(), but doesn't complain if
57 confname can't be found. This is useful if the SK_CONF_DECLARE is 57 confname can't be found. This is useful if the SK_CONF_DECLARE is
58 inside a source file whose linkage is dependent on the system. */ 58 inside a source file whose linkage is dependent on the system. */
59 #define SK_CONF_TRY_SET(confname, value) \ 59 #define SK_CONF_TRY_SET(confname, value) \
60 skRTConfRegistry().set(confname, value, false) 60 skRTConfRegistry().set(confname, value, false)
61 #else 61 #else
62 #define SK_CONF_DECLARE(confType, varName, confName, defaultValue, description) static confType varName = defaultValue 62 #define SK_CONF_DECLARE(confType, varName, confName, defaultValue, description) static confType varName = defaultValue
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // static_cast here is okay because there's only one kind of child class. 184 // static_cast here is okay because there's only one kind of child class.
185 const SkRTConf<T> *child_pointer = static_cast<const SkRTConf<T> *>(conf); 185 const SkRTConf<T> *child_pointer = static_cast<const SkRTConf<T> *>(conf);
186 return child_pointer && 186 return child_pointer &&
187 fName == child_pointer->fName && 187 fName == child_pointer->fName &&
188 fDescription == child_pointer->fDescription && 188 fDescription == child_pointer->fDescription &&
189 fValue == child_pointer->fValue && 189 fValue == child_pointer->fValue &&
190 fDefault == child_pointer->fDefault; 190 fDefault == child_pointer->fDefault;
191 } 191 }
192 192
193 #endif 193 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698