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

Side by Side Diff: src/utils/SkRTConf.cpp

Issue 133583003: Reduce verbosity of SkGraphics::Init in default case. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: final rebase Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkGraphics.cpp ('k') | no next file » | 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 #include "SkRTConf.h" 8 #include "SkRTConf.h"
9 #include "SkOSFile.h" 9 #include "SkOSFile.h"
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 if (confArray->getAt(0)->isDefault()) { 98 if (confArray->getAt(0)->isDefault()) {
99 o->writeText("# "); 99 o->writeText("# ");
100 } 100 }
101 confArray->getAt(0)->print(o); 101 confArray->getAt(0)->print(o);
102 o->newline(); 102 o->newline();
103 } 103 }
104 104
105 delete o; 105 delete o;
106 } 106 }
107 107
108 bool SkRTConfRegistry::hasNonDefault() const {
109 ConfMap::Iter iter(fConfs);
110 SkTDArray<SkRTConfBase *> *confArray;
111 while (iter.next(&confArray)) {
112 if (!confArray->getAt(0)->isDefault()) {
113 return true;
114 }
115 }
116 return false;
117 }
118
108 void SkRTConfRegistry::printNonDefault(const char *fname) const { 119 void SkRTConfRegistry::printNonDefault(const char *fname) const {
109 SkWStream *o; 120 SkWStream *o;
110 121
111 if (NULL != fname) { 122 if (NULL != fname) {
112 o = new SkFILEWStream(fname); 123 o = new SkFILEWStream(fname);
113 } else { 124 } else {
114 o = new SkDebugWStream(); 125 o = new SkDebugWStream();
115 } 126 }
116 ConfMap::Iter iter(fConfs); 127 ConfMap::Iter iter(fConfs);
117 SkTDArray<SkRTConfBase *> *confArray; 128 SkTDArray<SkRTConfBase *> *confArray;
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 sk_setenv("skia_nonexistent_item", "132"); 327 sk_setenv("skia_nonexistent_item", "132");
317 int result = 0; 328 int result = 0;
318 registryWithoutContents.parse("nonexistent.item", &result); 329 registryWithoutContents.parse("nonexistent.item", &result);
319 SkASSERT(result == 132); 330 SkASSERT(result == 132);
320 } 331 }
321 332
322 SkRTConfRegistry::SkRTConfRegistry(bool) 333 SkRTConfRegistry::SkRTConfRegistry(bool)
323 : fConfs(100) { 334 : fConfs(100) {
324 } 335 }
325 #endif 336 #endif
OLDNEW
« no previous file with comments | « src/core/SkGraphics.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698