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

Side by Side Diff: dm/DM.cpp

Issue 2120333002: deferred canvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove prev change to dmsrcsink Created 4 years, 5 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 | dm/DMSrcSink.cpp » ('j') | dm/DMSrcSink.cpp » ('J')
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 DEFINE_string2(readPath, r, "", "If set check for equality with golden results i n this directory."); 66 DEFINE_string2(readPath, r, "", "If set check for equality with golden results i n this directory.");
67 67
68 DEFINE_string(uninterestingHashesFile, "", 68 DEFINE_string(uninterestingHashesFile, "",
69 "File containing a list of uninteresting hashes. If a result hashes to s omething in " 69 "File containing a list of uninteresting hashes. If a result hashes to s omething in "
70 "this list, no image is written for that result."); 70 "this list, no image is written for that result.");
71 71
72 DEFINE_int32(shards, 1, "We're splitting source data into this many shards."); 72 DEFINE_int32(shards, 1, "We're splitting source data into this many shards.");
73 DEFINE_int32(shard, 0, "Which shard do I run?"); 73 DEFINE_int32(shard, 0, "Which shard do I run?");
74 74
75 DEFINE_string(mskps, "", "Directory to read mskps from, or a single mskp file.") ; 75 DEFINE_string(mskps, "", "Directory to read mskps from, or a single mskp file.") ;
76 DEFINE_bool(defer, false, "Run raster through SkDeferredCanvas");
77
78 bool gUseDeferredCanvas;
76 79
77 using namespace DM; 80 using namespace DM;
78 using sk_gpu_test::GrContextFactory; 81 using sk_gpu_test::GrContextFactory;
79 using sk_gpu_test::GLTestContext; 82 using sk_gpu_test::GLTestContext;
80 using sk_gpu_test::ContextInfo; 83 using sk_gpu_test::ContextInfo;
81 84
82 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/ 85 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/
83 86
84 static const double kStartMs = SkTime::GetMSecs(); 87 static const double kStartMs = SkTime::GetMSecs();
85 88
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 1251
1249 #undef PORTABLE_FONT_PREFIX 1252 #undef PORTABLE_FONT_PREFIX
1250 1253
1251 extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkFontStyle ) ; 1254 extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkFontStyle ) ;
1252 1255
1253 int dm_main(); 1256 int dm_main();
1254 int dm_main() { 1257 int dm_main() {
1255 setbuf(stdout, nullptr); 1258 setbuf(stdout, nullptr);
1256 setup_crash_handler(); 1259 setup_crash_handler();
1257 1260
1261 gUseDeferredCanvas = FLAGS_defer;
1262
1258 if (FLAGS_verbose) { 1263 if (FLAGS_verbose) {
1259 gVLog = stderr; 1264 gVLog = stderr;
1260 } else if (!FLAGS_writePath.isEmpty()) { 1265 } else if (!FLAGS_writePath.isEmpty()) {
1261 sk_mkdir(FLAGS_writePath[0]); 1266 sk_mkdir(FLAGS_writePath[0]);
1262 gVLog = freopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_str( ), "w", stderr); 1267 gVLog = freopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_str( ), "w", stderr);
1263 } 1268 }
1264 1269
1265 JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never missing. 1270 JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never missing.
1266 SkAutoGraphics ag; 1271 SkAutoGraphics ag;
1267 SkTaskGroup::Enabler enabled(FLAGS_threads); 1272 SkTaskGroup::Enabler enabled(FLAGS_threads);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1402 #endif 1407 #endif
1403 } 1408 }
1404 } // namespace skiatest 1409 } // namespace skiatest
1405 1410
1406 #if !defined(SK_BUILD_FOR_IOS) 1411 #if !defined(SK_BUILD_FOR_IOS)
1407 int main(int argc, char** argv) { 1412 int main(int argc, char** argv) {
1408 SkCommandLineFlags::Parse(argc, argv); 1413 SkCommandLineFlags::Parse(argc, argv);
1409 return dm_main(); 1414 return dm_main();
1410 } 1415 }
1411 #endif 1416 #endif
OLDNEW
« no previous file with comments | « no previous file | dm/DMSrcSink.cpp » ('j') | dm/DMSrcSink.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698