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

Side by Side Diff: dm/DM.cpp

Issue 1783603006: Revert of 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) { 1306 if (FLAGS_verbose && !FLAGS_writePath.isEmpty()) {
1307 if(!FLAGS_writePath.isEmpty()) { 1307 sk_mkdir(FLAGS_writePath[0]);
1308 sk_mkdir(FLAGS_writePath[0]); 1308 gVLog = freopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_str( ), "w", stderr);
1309 gVLog = freopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_ str(), "w", stderr);
1310 } else {
1311 gVLog = stderr;
1312 }
1313 } 1309 }
1314 1310
1315 JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never missing. 1311 JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never missing.
1316 SkAutoGraphics ag; 1312 SkAutoGraphics ag;
1317 SkTaskGroup::Enabler enabled(FLAGS_threads); 1313 SkTaskGroup::Enabler enabled(FLAGS_threads);
1318 gCreateTypefaceDelegate = &create_from_name; 1314 gCreateTypefaceDelegate = &create_from_name;
1319 1315
1320 { 1316 {
1321 SkString testResourcePath = GetResourcePath("color_wheel.png"); 1317 SkString testResourcePath = GetResourcePath("color_wheel.png");
1322 SkFILEStream testResource(testResourcePath.c_str()); 1318 SkFILEStream testResource(testResourcePath.c_str());
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 Reporter* reporter, 1480 Reporter* reporter,
1485 GrContextFactory* fac tory); 1481 GrContextFactory* fac tory);
1486 } // namespace skiatest 1482 } // namespace skiatest
1487 1483
1488 #if !defined(SK_BUILD_FOR_IOS) 1484 #if !defined(SK_BUILD_FOR_IOS)
1489 int main(int argc, char** argv) { 1485 int main(int argc, char** argv) {
1490 SkCommandLineFlags::Parse(argc, argv); 1486 SkCommandLineFlags::Parse(argc, argv);
1491 return dm_main(); 1487 return dm_main();
1492 } 1488 }
1493 #endif 1489 #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