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

Side by Side Diff: dm/DM.cpp

Issue 1788743002: When not writing to file in DM, spew verbose output to stderr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | 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 "CrashHandler.h" 8 #include "CrashHandler.h"
9 #include "DMJsonWriter.h" 9 #include "DMJsonWriter.h"
10 #include "DMSrcSink.h" 10 #include "DMSrcSink.h"
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 } 1296 }
1297 1297
1298 #undef PORTABLE_FONT_PREFIX 1298 #undef PORTABLE_FONT_PREFIX
1299 1299
1300 extern SkTypeface* (*gCreateTypefaceDelegate)(const char [], SkTypeface::Style ) ; 1300 extern SkTypeface* (*gCreateTypefaceDelegate)(const char [], SkTypeface::Style ) ;
1301 1301
1302 int dm_main(); 1302 int dm_main();
1303 int dm_main() { 1303 int dm_main() {
1304 setup_crash_handler(); 1304 setup_crash_handler();
1305 1305
1306 if (FLAGS_verbose && !FLAGS_writePath.isEmpty()) { 1306 if (FLAGS_verbose) {
1307 sk_mkdir(FLAGS_writePath[0]); 1307 if(!FLAGS_writePath.isEmpty()) {
1308 gVLog = freopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_str( ), "w", stderr); 1308 sk_mkdir(FLAGS_writePath[0]);
1309 gVLog = freopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_ str(), "w", stderr);
1310 } else {
1311 gVLog = stderr;
1312 }
1309 } 1313 }
1310 1314
1311 JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never missing. 1315 JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never missing.
1312 SkAutoGraphics ag; 1316 SkAutoGraphics ag;
1313 SkTaskGroup::Enabler enabled(FLAGS_threads); 1317 SkTaskGroup::Enabler enabled(FLAGS_threads);
1314 gCreateTypefaceDelegate = &create_from_name; 1318 gCreateTypefaceDelegate = &create_from_name;
1315 1319
1316 { 1320 {
1317 SkString testResourcePath = GetResourcePath("color_wheel.png"); 1321 SkString testResourcePath = GetResourcePath("color_wheel.png");
1318 SkFILEStream testResource(testResourcePath.c_str()); 1322 SkFILEStream testResource(testResourcePath.c_str());
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 Reporter* reporter, 1484 Reporter* reporter,
1481 GrContextFactory* fac tory); 1485 GrContextFactory* fac tory);
1482 } // namespace skiatest 1486 } // namespace skiatest
1483 1487
1484 #if !defined(SK_BUILD_FOR_IOS) 1488 #if !defined(SK_BUILD_FOR_IOS)
1485 int main(int argc, char** argv) { 1489 int main(int argc, char** argv) {
1486 SkCommandLineFlags::Parse(argc, argv); 1490 SkCommandLineFlags::Parse(argc, argv);
1487 return dm_main(); 1491 return dm_main();
1488 } 1492 }
1489 #endif 1493 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698