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

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

Issue 136963004: fix leaks in SkConf (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 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 | « no previous file | src/utils/SkRTConf.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 * 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 /** \class SkRTConfRegistry 68 /** \class SkRTConfRegistry
69 A class that maintains a systemwide registry of all runtime configuration 69 A class that maintains a systemwide registry of all runtime configuration
70 parameters. Mainly used for printing them out and handling multiply-defined 70 parameters. Mainly used for printing them out and handling multiply-defined
71 knobs. 71 knobs.
72 */ 72 */
73 73
74 class SkRTConfRegistry { 74 class SkRTConfRegistry {
75 public: 75 public:
76 SkRTConfRegistry(); 76 SkRTConfRegistry();
77 ~SkRTConfRegistry();
77 void printAll(const char *fname = NULL) const; 78 void printAll(const char *fname = NULL) const;
78 bool hasNonDefault() const; 79 bool hasNonDefault() const;
79 void printNonDefault(const char *fname = NULL) const; 80 void printNonDefault(const char *fname = NULL) const;
80 const char *configFileLocation() const; 81 const char *configFileLocation() const;
81 void possiblyDumpFile() const; 82 void possiblyDumpFile() const;
82 void validate() const; 83 void validate() const;
83 template <typename T> void set(const char *confname, 84 template <typename T> void set(const char *confname,
84 T value, 85 T value,
85 bool warnIfNotFound = true); 86 bool warnIfNotFound = true);
86 #ifdef SK_SUPPORT_UNITTEST 87 #ifdef SK_SUPPORT_UNITTEST
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // static_cast here is okay because there's only one kind of child class. 186 // static_cast here is okay because there's only one kind of child class.
186 const SkRTConf<T> *child_pointer = static_cast<const SkRTConf<T> *>(conf); 187 const SkRTConf<T> *child_pointer = static_cast<const SkRTConf<T> *>(conf);
187 return child_pointer && 188 return child_pointer &&
188 fName == child_pointer->fName && 189 fName == child_pointer->fName &&
189 fDescription == child_pointer->fDescription && 190 fDescription == child_pointer->fDescription &&
190 fValue == child_pointer->fValue && 191 fValue == child_pointer->fValue &&
191 fDefault == child_pointer->fDefault; 192 fDefault == child_pointer->fDefault;
192 } 193 }
193 194
194 #endif 195 #endif
OLDNEW
« no previous file with comments | « no previous file | src/utils/SkRTConf.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698