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

Unified Diff: tools/skpdiff/skpdiff_main.cpp

Issue 27541003: add initial support ofr multi-threaded execution (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« tools/skpdiff/SkDiffContext.cpp ('K') | « tools/skpdiff/SkDiffContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skpdiff/skpdiff_main.cpp
diff --git a/tools/skpdiff/skpdiff_main.cpp b/tools/skpdiff/skpdiff_main.cpp
index f89cc372c5ca36adf2e860dc9c3159d144716963..55640f7f0ade5f7c58930fa73845b68af52e8496 100644
--- a/tools/skpdiff/skpdiff_main.cpp
+++ b/tools/skpdiff/skpdiff_main.cpp
@@ -40,6 +40,7 @@ DEFINE_string2(patterns, p, "", "Use two patterns to compare images: <baseline>
DEFINE_string2(output, o, "", "Writes the output of these diffs to output: <output>");
DEFINE_bool(jsonp, true, "Output JSON with padding");
DEFINE_string(csv, "", "Writes the output of these diffs to a csv file");
+DEFINE_int32(threads, -1, "run N threads in parallel [default is derived from CPUs available]");
#if SK_SUPPORT_OPENCL
/// A callback for any OpenCL errors
@@ -188,6 +189,10 @@ int tool_main(int argc, char * argv[]) {
SkDiffContext ctx;
ctx.setDiffers(chosenDiffers);
+ if (FLAGS_threads >= 0) {
+ ctx.setThreadCount(FLAGS_threads);
+ }
+
// Perform a folder diff if one is requested
if (!FLAGS_folders.isEmpty()) {
ctx.diffDirectories(FLAGS_folders[0], FLAGS_folders[1]);
« tools/skpdiff/SkDiffContext.cpp ('K') | « tools/skpdiff/SkDiffContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698