SkGraphics::Init() now checks to see if there are any non-default
runtime configuration options before announcing that it is about
to print out the non-default runtime configuration options.
This makes the executables in tools/ less verbose.
Add SkRTConfRegistry::countNonDefault() function.
BUG=
R=mtklein@google.com, reed@google.com
Review URL: https://codereview.chromium.org/
133583003
git-svn-id: http://skia.googlecode.com/svn/trunk@13017
2bbb7eff-a529-9590-31e7-
b0007b416f81
public:
SkRTConfRegistry();
void printAll(const char *fname = NULL) const;
+ bool hasNonDefault() const;
void printNonDefault(const char *fname = NULL) const;
const char *configFileLocation() const;
void possiblyDumpFile() const;
#ifdef SK_DEVELOPER
skRTConfRegistry().possiblyDumpFile();
skRTConfRegistry().validate();
- SkDebugf("Non-default runtime configuration options:\n");
- skRTConfRegistry().printNonDefault( );
+ if (skRTConfRegistry().hasNonDefault()) {
+ SkDebugf("Non-default runtime configuration options:\n");
+ skRTConfRegistry().printNonDefault();
+ }
#endif
#ifdef BUILD_EMBOSS_TABLE
delete o;
}
+bool SkRTConfRegistry::hasNonDefault() const {
+ ConfMap::Iter iter(fConfs);
+ SkTDArray<SkRTConfBase *> *confArray;
+ while (iter.next(&confArray)) {
+ if (!confArray->getAt(0)->isDefault()) {
+ return true;
+ }
+ }
+ return false;
+}
+
void SkRTConfRegistry::printNonDefault(const char *fname) const {
SkWStream *o;